-
Notifications
You must be signed in to change notification settings - Fork 525
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
M365DSCDRGUtil: BaseUrl is empty since MSCloudLoginAssistant removed Intune workload #4057
Comments
This was introduced here but not sure of the context: |
Other clouds such as AzureUSGovernment or AzureDOD don't use https://graph.microsoft.com, instead in this case they have https://graph.microsoft.us and https://dod-graph.microsoft.us respectively so by hardcoding the BaseUrl to https://graph.microsoft.com your cmdlets wouldn't work on those clouds. |
Did a quick search in vscode and could find 82 occurrences of graph.microsoft.com Would be good to use the MSCloudLoginAssistant variable everywhere |
Maybe we actually shouldn't rely on any var at all, e.g. doing the below works just fine and that's why your cmdlets still work with the var being null. I'll update this PR. Invoke-GraphRequest -Uri "/beta/deviceAppManagement/mdmWindowsInformationProtectionPolicies" |
Description of the issue
The cmdlets mentioned at the bottom need to query Graph and to construct the endpoint URI they rely on getting the BaseUrl from MSCloudLoginAssistant, nevertheless it tries to get that URL from the Intune workload which doesn't exist in that module anymore since a couple of releases.
To fix this it needs to be changed to take the URL from the MicrosoftGraph object instead.
New-IntuneSettingCatalogPolicy
Update-IntuneSettingCatalogPolicy
Update-DeviceConfigurationPolicyAssignment
Microsoft 365 DSC Version
1.23.1213.1
Which workloads are affected
other
The DSC configuration
N/A
Verbose logs showing the problem
N/A
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: