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

Power Platform configuration, such as DLP policies, cannot be exported via delegated authentication #5791

Open
KuotingChiu opened this issue Feb 17, 2025 · 0 comments

Comments

@KuotingChiu
Copy link

Description of the issue

For Power Platform delegated authentication, it does not seem any Graph PowerShell permissions are needed. But exporting any Power Platform configuration resulted in error.

The ID I am using definitely has the permission that I can run Get-DlpPolicy and able to get results.

Microsoft 365 DSC Version

1.25.212.2

Which workloads are affected

Power Platform

The DSC configuration

$Components = @("PPAdminDLPPolicy")
Export-M365DSCConfiguration -Path $path -FileName $Filename -Credential $Credential -Components $Components

Exporting Microsoft 365 configuration for Components: PPAdminDLPPolicy

Authentication methods specified:
- Credentials

[1/1] Extracting [PPAdminDLPPolicy] using {Credentials}...❌
Error Log created at {file://C:/Users/GC89140/12580-M365DSC-ErrorLog.log}
⌛ Export took {20 seconds} for {0 instances}


Message in the ErrorLog

[2025/02/17 05:09:23]
{NotSpecified}
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.PrepareSession()
   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
"Error during Export:"
at Invoke-M365DSCPowerPlatformRESTWebRequest, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.212.2\Modules\WorkloadHelpers\M365DSCPowerPlatformRESTHelper.psm1: line 31
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.212.2\DSCResources\MSFT_PPAdminDLPPolicy\MSFT_PPAdminDLPPolicy.psm1: line 435
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.212.2\Modules\M365DSCReverse.psm1: line 689
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.212.2\Modules\M365DSCUtil.psm1: line 1512
at <ScriptBlock>, <No file>: line 1
User ID masked
TenantId: masked

Verbose logs showing the problem

[2025/02/17 05:09:23]
{NotSpecified}
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.PrepareSession()
   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
"Error during Export:"
at Invoke-M365DSCPowerPlatformRESTWebRequest, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.212.2\Modules\WorkloadHelpers\M365DSCPowerPlatformRESTHelper.psm1: line 31
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.212.2\DSCResources\MSFT_PPAdminDLPPolicy\MSFT_PPAdminDLPPolicy.psm1: line 435
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.212.2\Modules\M365DSCReverse.psm1: line 689
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.212.2\Modules\M365DSCUtil.psm1: line 1512
at <ScriptBlock>, <No file>: line 1
qgc89140s@higtest.com
TenantId: higtest.com

Environment Information + PowerShell Version

Name                           Value
----                           -----
PSVersion                      5.1.22621.4391
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.4391
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
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

No branches or pull requests

1 participant