You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AADConditionalAccessPolicy.Set-TargetResource call to Invoke-MgGraphRequest use 2 hard coded graph.microsoft.com endpoint which results in failure with EntraID Government tenants.
Correct call should use $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl for the graph hostname.
Description of the issue
AADConditionalAccessPolicy.Set-TargetResource call to Invoke-MgGraphRequest use 2 hard coded graph.microsoft.com endpoint which results in failure with EntraID Government tenants.
Correct call should use $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl for the graph hostname.
$Uri =$Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/identity/conditionalAccess/policies/$ ($currentPolicy.Id)"
and
$Uri = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/identity/conditionalAccess/policies"
FYI: All calls to graph.microsoft.com need to be replaced with a cloud specific endpoint and Devs need to stop hard coding graph.microsoft.com
Microsoft 365 DSC Version
1.24.1016.1
Which workloads are affected
Azure Active Directory (Entra ID)
The DSC configuration
No response
Verbose logs showing the problem
No response
Environment Information + PowerShell Version
No response
The text was updated successfully, but these errors were encountered: