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

IntuneDeviceConfigurationWiredNetworkPolicyWindows10 Functions have hard coded Commercial Graph endpoints breaking Government #5224

Open
mpoulson opened this issue Oct 21, 2024 · 0 comments · May be fixed by #5236

Comments

@mpoulson
Copy link

Description of the issue

IntuneSettingCatalogCustomPolicyWindows10 functions call to Invoke-MgGraphRequest use a 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.

Get-DeviceConfigurationPolicyCertificate
$Uri = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/deviceManagement/deviceConfigurations('$DeviceConfigurationPolicyId')/microsoft.graph.windowsWiredNetworkConfiguration/$CertificateName"

DeviceConfigurationPolicyCertificateId
$Uri = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/deviceManagement/deviceConfigurations('$DeviceConfigurationPolicyId')/microsoft.graph.windowsWiredNetworkConfiguration/$CertificateName/`$ref"

Remove-DeviceConfigurationPolicyCertificateId
$Uri = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/deviceManagement/deviceConfigurations('$DeviceConfigurationPolicyId')/microsoft.graph.windowsWiredNetworkConfiguration/$CertificateName/$certificateId/`$ref"

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

Intune

The DSC configuration

No response

Verbose logs showing the problem

No response

Environment Information + PowerShell Version

No response

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 a pull request may close this issue.

1 participant