dsccommunity / SharePointDsc

The SharePointDsc PowerShell module provides DSC resources that can be used to deploy and manage a SharePoint farm
MIT License
245 stars 107 forks source link

Issue while exporting the site configurations with certificate thumbprint #1421

Closed Abhishekbaskar26 closed 1 year ago

Abhishekbaskar26 commented 1 year ago

Problem description

Issue while exporting the site configurations using the certificate thumbprint

I have run this command "Export-M365DSCConfiguration" with the Azure AD App and certificate thumbprint. It is showing this an error in between the flow.

Verbose logs

Connect-MgGraph : You specified a different tenant - once in WithAuthority() and once using WithTenant().
At C:\Program Files\WindowsPowerShell\Modules\MSCloudLoginAssistant\1.0.105\Workloads\MicrosoftGraph.psm1:86 char:21
+ ...             Connect-MgGraph -ClientId $Global:MSCloudLoginConnectionP ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Connect-MgGraph], MsalClientException
    + FullyQualifiedErrorId : Microsoft.Graph.PowerShell.Authentication.Cmdlets.ConnectMgGraph

Authentication needed, call Connect-MgGraph.

DSC configuration

Export-M365DSCConfiguration -Components @("ODSettings", "SPOAccessControlSettings", "SPOApp", "SPOBrowserIdleSignout", "SPOHubSite", "SPOSharingSettings", "SPOSiteDesign", "SPOTenantCdnPolicy", "SPOTenantSettings", "SPOTheme") -Path $SPPath -FileName "SPOConfig$Date.ps1" -ApplicationId <Aad App Id> -CertificateThumbprint <Cert-thumbprint> -TenantId <TenantId> -Verbose

Suggested solution

Any suggestions?

SharePoint version and build

SharePoint Online

Operating system the target node is running

OsName               : Microsoft Windows Server 2016 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsBuildLabEx    : 14393.5582.amd64fre.rs1_release.221130-1719
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

PowerShell version and build the target node is running

PSVersion                      5.1.14393.5582                                                                                                                                        
PSEdition                      Desktop                                                                                                                                               
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                               
BuildVersion                   10.0.14393.5582                                                                                                                                       
CLRVersion                     4.0.30319.42000                                                                                                                                       
WSManStackVersion              3.0                                                                                                                                                   
PSRemotingProtocolVersion      2.3                                                                                                                                                   
SerializationVersion           1.1.0.1

SharePointDsc version

DSC Version : 1.23.301.1
andikrueger commented 1 year ago

Could please raise this issue within the M365DSC repo: https://github.com/microsoft/Microsoft365DSC

ykuijs commented 1 year ago

Closing because this is not SharePointDsc related. As suggested, please create an issue in the Microsoft365DSC repo