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 a...
Norman Young
Jul 05, 2019MVP
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-MARTINJul 05, 2019Brass 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 WilsonJul 05, 2019Brass 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.
- Norman YoungJul 05, 2019MVP
This works:
Connect-PnPOnline -SPOManagementShell -Url https://contoso-admin.sharepoint.com -ClearTokenCache