Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

M365DSCDRGUtil.psm1 Update-IntuneDeviceConfigurationPolicy hard codes Commercial Graph API breaking Government

Open mpoulson opened this issue 4 months ago • 0 comments

Update-IntuneDeviceConfigurationPolicy function call to Invoke-MgGraphRequest has hardcoded URL to commercial endpoint which breaks support for Intune Government

Correction should be something like this. $Uri = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/deviceManagement/configurationPolicies/$DeviceConfigurationPolicyId"

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

mpoulson avatar Oct 20 '24 22:10 mpoulson