microsoft / Microsoft365DSC

Manages, configures, extracts and monitors Microsoft 365 tenant configurations
https://aka.ms/M365DSC
MIT License
1.59k stars 500 forks source link

The DSC points to a different admin url that is not present in the tenant #3995

Open Hitaga opened 11 months ago

Hitaga commented 11 months ago

Description of the issue

Hello Team,

I have been trying to use DSC as I'm new to it All the workloads worked fine except for SharePoint and OneDrive the code used by me is:

Getting client credential

$Credential = Get-Credential

Exporting resources using credentials

Export-M365DSCConfiguration -Components @("ODSettings", "SPOAccessControlSettings", "SPOApp", "SPOBrowserIdleSignout", "SPOOrgAssetsLibrary", "SPOPropertyBag", "SPOSearchManagedProperty", "SPOSearchResultSource", "SPOSharingSettings", "SPOSiteAuditSettings", "SPOSiteDesign", "SPOSiteDesignRights", "SPOStorageEntity", "SPOTenantCdnEnabled", "SPOTenantCdnPolicy", "SPOTenantSettings") -Credential $Credential

======================================== it tries to connect to worksite-admin.tenant.com where as our admincenter url is0365-admin.tenant.com

please advice what am i doing wrong? image ERROR SPO DSC

Microsoft 365 DSC Version

1.23.927.1

Which workloads are affected

SharePoint Online

The DSC configuration

# Getting client credential
$Credential = Get-Credential

# Exporting resources using credentials
Export-M365DSCConfiguration -Components @("ODSettings", "SPOAccessControlSettings", "SPOApp", "SPOBrowserIdleSignout", "SPOOrgAssetsLibrary", "SPOPropertyBag", "SPOSearchManagedProperty", "SPOSearchResultSource", "SPOSharingSettings", "SPOSiteAuditSettings", "SPOSiteDesign", "SPOSiteDesignRights", "SPOStorageEntity", "SPOTenantCdnEnabled", "SPOTenantCdnPolicy", "SPOTenantSettings") -Credential $Credential

Verbose logs showing the problem

No response

Environment Information + PowerShell Version

No response

andikrueger commented 11 months ago

Just a few questions:

Hitaga commented 11 months ago

Does your M365 Account have a worksites domain? Im not sure what this is Do you happen to did change the onmicrosoft.com domain in the past? -- NO we havent Are you using a Guest account, which would not work.--- Using a Global Admin Account

Hitaga commented 11 months ago

we are using Vanity urls for Sharepoint