Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Powerplatform token failure

Open 1Dimitri opened this issue 1 year ago • 1 comments

Description of the issue

Although there is a PR for MSCloudLoginAssistant 1.1,54, it seems there is an exception that is not caught

Microsoft 365 DSC Version

1.25.1112.1

Which workloads are affected

Power Platform

The DSC configuration

# $creds
# Name                           Value
# ----                           -----
# TenantID                       xxxxxx.onmicrosoft.com
# ApplicationID                  deadbeef-dead-beef-dead-deadbeefdead
# CertificateThumbprint          DEADBEEFDEADBEEFDEADBEEF000000000000000

Export-M365DSCConfiguration -Components @('PPTenantIsolationSettings') -Path d:\tmp @creds

Verbose logs showing the problem

[2025/12/01 02:32:02]
{InvalidOperation}
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 Get-AuthToken, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.1.54\MSCloudLoginAssistant.psm1: line 1119
at Connect-MSCloudLoginPowerPlatformRESTWithCertificateThumbprint, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.1.54\Workloads\PowerPlatformREST.ps1: line 140
at Connect-MSCloudLoginPowerPlatformREST, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.1.54\Workloads\PowerPlatformREST.ps1: line 44
at Connect, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.1.54\ConnectionProfile.ps1: line 985
at Connect-M365Tenant, C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.1.54\MSCloudLoginAssistant.psm1: line 245
at New-M365DSCConnection, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.1112.1\Modules\M365DSCUtil.psm1: line 2817
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.1112.1\DSCResources\MSFT_PPTenantIsolationSettings\MSFT_PPTenantIsolationSettings.psm1: line 662
at <ScriptBlock>, <No file>: line 105
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.1112.1\Modules\M365DSCReverse.psm1: line 815
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.1112.1\Modules\M365DSCUtil.psm1: line 1844
at <ScriptBlock>, <No file>: line 1
TenantId: xxxxxx.onmicrosoft.com

Environment Information + PowerShell Version


1Dimitri avatar Dec 01 '25 15:12 1Dimitri

This should have actually been fixed with version 1.1.54. After checking the contents of the downloaded module and what's available on the PowerShell gallery, it seems like the changes were NOT processed and the version 1.1.54 is pretty much the same as 1.1.53, with an updated module version. I'm in contact with the maintainer for a re-release.

FabienTschanz avatar Dec 01 '25 21:12 FabienTschanz