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
Details of the scenario you tried and the problem that is occurring
For GCC High Tenant, getting Bad Request error message for O365OrgSettings.
Verbose logs showing the problem
System.Net.WebException: The remote server returned an error: (400) Bad Request.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
"Error during Export:"
at Connect-MSCloudLoginTasksWithCertificateThumbprint, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.0.120\Workloads\Tasks.psm1: line 187
at Connect-MSCloudLoginTasks, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.0.120\Workloads\Tasks.psm1: line 24
at Connect, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.0.120\ConnectionProfile.psm1: line 560
at Connect-M365Tenant, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.0.120\MSCloudLoginAssistant.psm1: line 335
at New-M365DSCConnection, C:\Program Files\WindowsPowerShell\Modules\Microsoft365dsc\1.23.906.1\modules\M365DSCUtil.psm1: line 1981
at Get-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365dsc\1.23.906.1\DSCResources\MSFT_O365OrgSettings\MSFT_O365OrgSettings.psm1: line 156
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365dsc\1.23.906.1\DSCResources\MSFT_O365OrgSettings\MSFT_O365OrgSettings.psm1: line 1047
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365dsc\1.23.906.1\modules\M365DSCReverse.psm1: line 615
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365dsc\1.23.906.1\modules\M365DSCUtil.psm1: line 1310
at , : line 1
Suggested solution to the issue
This resource contains a lot of Invoke-MgGraphRequest lines, but the URLs apply to global / commercial tenants only. Fix would be to detect cloud type (or take a parameter specifying GCC high) and use the GCC / GCC high API endpoints for these invoke-mggraphrequest commands (i.e. .US rather than .COM)
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Details of the scenario you tried and the problem that is occurring
For GCC High Tenant, getting Bad Request error message for O365OrgSettings.
Verbose logs showing the problem
System.Net.WebException: The remote server returned an error: (400) Bad Request.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
"Error during Export:"
at Connect-MSCloudLoginTasksWithCertificateThumbprint, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.0.120\Workloads\Tasks.psm1: line 187
at Connect-MSCloudLoginTasks, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.0.120\Workloads\Tasks.psm1: line 24
at Connect, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.0.120\ConnectionProfile.psm1: line 560
at Connect-M365Tenant, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.0.120\MSCloudLoginAssistant.psm1: line 335
at New-M365DSCConnection, C:\Program Files\WindowsPowerShell\Modules\Microsoft365dsc\1.23.906.1\modules\M365DSCUtil.psm1: line 1981
at Get-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365dsc\1.23.906.1\DSCResources\MSFT_O365OrgSettings\MSFT_O365OrgSettings.psm1: line 156
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365dsc\1.23.906.1\DSCResources\MSFT_O365OrgSettings\MSFT_O365OrgSettings.psm1: line 1047
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365dsc\1.23.906.1\modules\M365DSCReverse.psm1: line 615
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365dsc\1.23.906.1\modules\M365DSCUtil.psm1: line 1310
at , : line 1
Suggested solution to the issue
This resource contains a lot of Invoke-MgGraphRequest lines, but the URLs apply to global / commercial tenants only. Fix would be to detect cloud type (or take a parameter specifying GCC high) and use the GCC / GCC high API endpoints for these invoke-mggraphrequest commands (i.e. .US rather than .COM)
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
OsName : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage : en-GB
OsMuiLanguages : {en-GB, en-US}
Version of the DSC module that was used ('dev' if using current dev branch)
The text was updated successfully, but these errors were encountered: