Connect-PnPOnline with useweblogin saved on desktop

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:

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

Other articles

https://www.benstegink.com/powershell-connect-pnponline-is-using-cached-credentials/

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *