Skip to content

Commit

Permalink
Merge pull request #5772 from Pranaykarvi/fix-terms-of-use-array
Browse files Browse the repository at this point in the history
Fix #5742: Ensure TermsOfUse is an array in AADConditionalAccessPolicy
  • Loading branch information
NikCharlebois authored Feb 26, 2025
2 parents 01a4b32 + 86c4fdb commit a5e1787
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# UNRELEASED

* AADConditionalAccessPolicy
* Fixed an issue where `TermsOfUse` was not passed as an array, causing failures in GCC-High environments.
FIXES [#5742](https://github.com/microsoft/Microsoft365DSC/issues/5742)
* AADPasswordRuleSettings
* Updated schema to only accept values 'Enforced' and 'Audit' for parameter BannedPasswordCheckOnPremisesMode
* IntuneDeviceCompliancePolicyWindows10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1778,12 +1778,13 @@ function Set-TargetResource
}
}

if ($TermsOfUse)
{
Write-Verbose -Message "Gettign Terms of Use {$TermsOfUse}"
$TermsOfUseObj = Get-MgBetaAgreement | Where-Object -FilterScript { $_.DisplayName -eq $TermsOfUse }
$GrantControls.Add('termsOfUse', $TermsOfUseObj.Id)
}
if ($TermsOfUse)
{
Write-Verbose -Message "Getting Terms of Use {$TermsOfUse}"
$TermsOfUseObj = Get-MgBetaAgreement | Where-Object -FilterScript { $_.DisplayName -eq $TermsOfUse }
$GrantControls.Add('termsOfUse', @($TermsOfUseObj.Id))
}


#no translation or conversion needed
Write-Verbose -Message 'Set-Targetresource: Adding processed grant controls'
Expand Down

0 comments on commit a5e1787

Please sign in to comment.