microsoft / MSCloudLoginAssistant

PowerShell Module Handling Authentication to Cloud Services
https://www.powershellgallery.com/packages/MSCloudLoginAssistant/
MIT License
72 stars 47 forks source link

Exporting SPOUserProfileProperties - Export-M365DSCConfiguration #155

Open vigurusa opened 1 year ago

vigurusa commented 1 year ago

Used the following cmdlet to export all the following components using Certificate and Thumbprint:

Export-M365DSCConfiguration -Components @("ODSettings", "SPOAccessControlSettings", "SPOApp", "SPOBrowserIdleSignout", "SPOHomeSite", "SPOHubSite", "SPOOrgAssetsLibrary", "SPOPropertyBag", "SPOSearchManagedProperty", "SPOSearchResultSource", "SPOSharingSettings", "SPOSite", "SPOSiteAuditSettings", "SPOSiteDesign", "SPOSiteDesignRights", "SPOSiteGroup", "SPOSiteScript", "SPOStorageEntity", "SPOTenantCdnEnabled", "SPOTenantCdnPolicy", "SPOTenantSettings", "SPOTheme", "SPOUserProfileProperty") -ApplicationId $ApplicationId -CertificateThumbprint $CertificateThumbprint -TenantId $TenantId -Path "c:\M365DSC\demo3" -FileName "M365xBBBBBBB.ps1"

Experienced the following exception mentioned in the Error Log file:

{InvalidData} System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Properties' because it is null. at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) "Error during Export:" at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.23.510.1\DSCResources\MSFT_SPOUserProfileProperty\MSFT_SPOUserProfileProperty.psm1: line 329 at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.23.510.1\modules\M365DSCReverse.psm1: line 619 at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.23.510.1\modules\M365DSCUtil.psm1: line 1288 at , : line 1 TenantId: M365xBBBBBBB.onmicrosoft.com

Anyone experienced this before? if so, any suggestions.

andikrueger commented 11 months ago

Cloud you please raise this issue over there: https://github.com/microsoft/Microsoft365DSC/issues

From the looks of it: There might be already a solution within one of the newer M365DSC versions.