Jun 03 2019 05:03 PM - edited Jun 04 2019 03:59 PM
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
Jul 05 2019 12:59 AM
Jul 05 2019 06:02 AM
Have you tried the -Credentials (Get-Credential) parameter?
Connect-PnPOnline -Url https://contoso.sharepoint.com -Credentials (Get-Credential)
I hope this helps.
Norm
Jul 05 2019 08:33 AM - edited Jul 05 2019 08:33 AM
Jul 05 2019 08:33 AM - edited Jul 05 2019 08:33 AM
@Norman Young @Frederick Wilson
I needed to use a web login because of MFA.
But I found a solution :
Connect-PnPOnline -Url "https://xxxxxxx.sharepoint.com" -SPOManagementShell -ClearTokenCache
Jul 05 2019 09:16 AM
Jul 05 2019 11:03 AM
This works:
Connect-PnPOnline -SPOManagementShell -Url https://contoso-admin.sharepoint.com -ClearTokenCache
Jul 12 2019 04:35 AM
I will try this. Thank you.
Hopefully it lets me switch accounts when I try to log back in.