Skip to content

Commit

Permalink
Fixing conditional statement preventing non-management group scoped e…
Browse files Browse the repository at this point in the history
…xemptions from being processed when pointed to Azure China tenants. (#702)

Co-authored-by: Andy Sullivan <[email protected]>
  • Loading branch information
ahsulli and Andy Sullivan authored Jul 16, 2024
1 parent 21812f7 commit fc72ce1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Scripts/Helpers/Get-AzPolicyExemptions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Get-AzPolicyExemptions {
$scopeInformation = $ScopeTable.$scopeId
if ($scopeInformation.type -ne "microsoft.resources/subscriptions/resourceGroups" -and $scopeId -ne "root") {
$exemptionsLocal = @()
if ($scopeInformation.type -eq "microsoft.resources/subscriptions") {
if ($scopeInformation.type -ne "Microsoft.Management/managementGroups") {
$exemptionsLocal = Get-AzPolicyExemptionsRestMethod -Scope $scopeId -ApiVersion $PacEnvironment.apiVersions.policyExemptions
}
elseif ($scopeInformation.type -eq "Microsoft.Management/managementGroups") {
Expand Down

0 comments on commit fc72ce1

Please sign in to comment.