Skip to content

Commit

Permalink
removed references that call Test-MgCommandPrerequisites with paramet…
Browse files Browse the repository at this point in the history
…er -APIVersion beta
  • Loading branch information
BohrenAn committed May 26, 2024
1 parent 2f0002d commit 322879b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Find-MsIdUnprotectedUsersWithAdminRoles.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Find-MsIdUnprotectedUsersWithAdminRoles {
begin {
## Initialize Critical Dependencies
$CriticalError = $null
if (!(Test-MgCommandPrerequisites 'Get-MgUser', 'Get-MgUserAuthenticationMethod', 'Get-MgGroupMember', 'Get-MgRoleManagementDirectoryRoleDefinition', 'Get-MgRoleManagementDirectoryRoleAssignmentSchedule', 'Get-MgRoleManagementDirectoryRoleEligibilitySchedule', 'Get-MgAuditLogSignIn' -ApiVersion beta -MinimumVersion 2.8.0 -RequireListPermissions -ErrorVariable CriticalError)) { return }
if (!(Test-MgCommandPrerequisites 'Get-MgUser', 'Get-MgUserAuthenticationMethod', 'Get-MgGroupMember', 'Get-MgRoleManagementDirectoryRoleDefinition', 'Get-MgRoleManagementDirectoryRoleAssignmentSchedule', 'Get-MgRoleManagementDirectoryRoleEligibilitySchedule', 'Get-MgAuditLogSignIn' -MinimumVersion 2.8.0 -RequireListPermissions -ErrorVariable CriticalError)) { return }


if ($VerbosePreference -eq 'SilentlyContinue') {
Expand Down
2 changes: 1 addition & 1 deletion src/Get-MsIdGroupWritebackConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function Get-MsIdGroupWritebackConfiguration {
begin {
## Initialize Critical Dependencies
$CriticalError = $null
if (!(Test-MgCommandPrerequisites 'Get-MgGroup' -ApiVersion beta -MinimumVersion 2.8.0 -ErrorVariable CriticalError)) { return }
if (!(Test-MgCommandPrerequisites 'Get-MgGroup' -MinimumVersion 2.8.0 -ErrorVariable CriticalError)) { return }
}

process {
Expand Down
2 changes: 1 addition & 1 deletion src/Update-MsIdGroupWritebackConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function Update-MsIdGroupWritebackConfiguration {
begin {
## Initialize Critical Dependencies
$CriticalError = $null
if (!(Test-MgCommandPrerequisites 'Get-MgGroup', 'Update-MgGroup' -ApiVersion beta -MinimumVersion 2.8.0 -ErrorVariable CriticalError)) { return }
if (!(Test-MgCommandPrerequisites 'Get-MgGroup', 'Update-MgGroup' -MinimumVersion 2.8.0 -ErrorVariable CriticalError)) { return }
}

process {
Expand Down
4 changes: 2 additions & 2 deletions src/internal/Test-MgCommandPrerequisites.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function Test-MgCommandPrerequisites {
[string[]] $Name,
# The service API version.
[Parameter(Mandatory = $false, Position = 2)]
[ValidateSet('v1.0', 'beta')]
[ValidateSet('v1.0')]
[string] $ApiVersion = 'v1.0',
# Specifies a minimum version.
[Parameter(Mandatory = $false)]
Expand Down Expand Up @@ -49,7 +49,7 @@ function Test-MgCommandPrerequisites {


if ($MgCommands.Count -gt 1) {
$MgCommand = $MgCommands[0]
$MgCommand = $MgCommands[0]
## Resolve from multiple results
[array] $MgCommandsWithPermissions = $MgCommands | Where-Object Permissions -NE $null
[array] $MgCommandsWithListPermissions = $MgCommandsWithPermissions | Where-Object URI -NotLike "*}"
Expand Down

0 comments on commit 322879b

Please sign in to comment.