microsoft / MSCloudLoginAssistant

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

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

Open bjoernf73 opened 1 year ago

bjoernf73 commented 1 year ago

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.
ykuijs commented 1 year ago

@NikCharlebois, this issue can be closed