MSCloudLoginAssistant icon indicating copy to clipboard operation
MSCloudLoginAssistant copied to clipboard

PnP: Fail to connect to a SharePoint AdminUrl (`Connect-PnPOnline`) that has a redirector where the default AdminUrl used to be

Open bjoernf73 opened this issue 2 years ago • 1 comments

Note: this issue will be resolved in a PR coming shortly.

Problem

Sharepoint Online-customers may have created a tenant with a specific name once in time, only to realize at a later stage that they had to rename their sharepoint domain, because the tenant name was not really what they wanted in their Sharepoint Online domain name, ref https://learn.microsoft.com/en-us/sharepoint/change-your-sharepoint-domain-name

MSCloudLoginAssisant is unable to detect when the Url it connects to is a redirector. When it does, operations (in Microsoft365Dsc) fail whenever Get-PnPTenant is ran. That function is ran for every resource that uses Connect-PnPOnline.

Suggestion

It should be able to

  1. detect when Url it connects to is a redirector,
  2. resolve the new Url/AdminUrl, and
  3. reconnect to that Url instead.

bjoernf73 avatar Jan 09 '23 13:01 bjoernf73