Forum Discussion
Frederick Wilson
Jun 04, 2019Brass Contributor
Change Connect-PNPOnline User
I am use Connect-PNPOnline -UseWebLogin successfully but I cannot figure out how to change the user.
I have logged with my normal account successfully but now when I want to login with my admin account it seems to have cached my normal user account.
How can I switch users?
I've tried
Disconnect-PNPOnline
I've tried opening a new PS window
I've tried using the -SPOManagementShell switch
6 Replies
Have you tried the -Credentials (Get-Credential) parameter?
Connect-PnPOnline -Url https://contoso.sharepoint.com -Credentials (Get-Credential)
I hope this helps.
Norm
- Guillaume BLANCO-MARTINBrass Contributor
I needed to use a web login because of MFA.
But I found a solution :
Connect-PnPOnline -Url "https://xxxxxxx.sharepoint.com" -SPOManagementShell -ClearTokenCache
- Frederick WilsonBrass ContributorI've tried the clear token option but it doesn't ask for a different login. It would be nice if there was a switch to enforce request login information.
- Guillaume BLANCO-MARTINBrass ContributorI'm also interested because i'm facing the same problem
Did you find a solution ?