Since the Introduction of Connect-PnPOnline -UseWebLogin, sometimes there were issues where the authentication method is somehow being stored on your desktop with the current session for some reason, and when trying to connect to another tenant, we cannot enter the new credentials and the stored ones are used.
I’ve verified that multiple issues have been created in GitHub:
- https://github.com/SharePoint/PnP-PowerShell/issues/1213
- https://github.com/SharePoint/PnP-PowerShell/issues/1523
- https://github.com/SharePoint/PnP-PowerShell/issues/1656
- https://github.com/SharePoint/PnP-Sites-Core/issues/1800
On my case, the solution was accessing the cookies of my browser on a specific folder and deleting all the files there. After running the Connect-PnPOnline -Url SITEURL -UseWebLogin everything starts working as expected.
C:\Users\USERNAME\AppData\Local\Microsoft\Windows\INetCache
Be First to Comment