Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #5742: Ensure TermsOfUse is an array in AADConditionalAccessPolicy #5772

Open
wants to merge 8 commits into
base: Dev
Choose a base branch
from

Conversation

Pranaykarvi
Copy link
Contributor

Fix for Issue #5742

Summary

  • Fixed an issue where TermsOfUse was not passed as an array, causing failures in GCC-High environments.
  • Updated MSFT_AADConditionalAccessPolicy.psm1 to wrap TermsOfUse ID in @().

Changes Made

  • Updated Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.psm1
  • Wrapped $TermsOfUseObj.Id in an array to ensure compliance.

Issue Reference

Fixes #5742

Copy link
Collaborator

@FabienTschanz FabienTschanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add an entry to the changelog as well?

Comment on lines 1781 to 1785
{
Write-Verbose -Message "Getting Terms of Use {$TermsOfUse}"
$TermsOfUseObj = Get-MgBetaAgreement | Where-Object -FilterScript { $_.DisplayName -eq $TermsOfUse }
$GrantControls.Add('termsOfUse', @($TermsOfUseObj.Id))
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pranaykarvi Is it only the view or did the indentation change? Please keep it the same as it was previously, thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FabienTschanz i have resolved the indentation and is now same as it was previously

@Pranaykarvi
Copy link
Contributor Author

@FabienTschanz I have also made an entry to the changelog

CHANGELOG.md Outdated
@@ -23,6 +23,9 @@
* TeamsM365App
* Remove `Ensure` property from being exported.
FIXES [#5781](https://github.com/microsoft/Microsoft365DSC/issues/5781)
* **AADConditionalAccessPolicy**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the double stars ** please? I guess they were mistakenly added.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FabienTschanz done, can you please check now?

Co-authored-by: Fabien Tschanz <71251572+FabienTschanz@users.noreply.github.com>
@FabienTschanz
Copy link
Collaborator

@NikCharlebois LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AADConditionalAccess expects Terms of Use to post as Array of TermsofUse id not single ID
2 participants