Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UseWebLogin in SharePoint PnP Cmdlets Uses Default Browser Authentication #1800

tseward opened this issue Jun 5, 2018 · 5 comments


None yet
5 participants
Copy link

commented Jun 5, 2018


[ ] Bug
[X] Enhancement


[X] Office 365 / SharePoint Online
[ ] SharePoint 2016
[ ] SharePoint 2013

If SharePoint on-premises, what's exact CU version:

Expected or Desired Behavior

Currently, when passing -UseWebLogin in Connect-PnPOnline, it leverages the default user's credentials. When administering systems such as SPO, companies often implement an elevated access account process.

The existing implementation of the -UseWebLogin parameter doesn't allow you to pass a specific account.

Observed Behavior

When specifying -UseWebLogin, credentials are automatically passed depending on the environment configuration to SharePoint Online.

Steps to Reproduce

Implement AD FS in a federated scenario with O365. With accounts replicated from AD DS to AAD via AAD Connect, log in with a non-privileged account to O365 via your default browser while logged into your Windows desktop with the same account. Provided AD FS is configured properly, the authentication may silently occur using Windows Integrated Auth.

In the same Windows session, using the PnP cmdlet, run:

Connect-PnPOnline -UseWebLogin

Instead of allowing you to specify credentials on the popup, your Windows desktop credentials are passed instead which may lead to a 403.


This comment has been minimized.

Copy link

commented Sep 13, 2018

I've the same error. Any updates please? Thanks!


This comment has been minimized.

Copy link

commented Mar 29, 2019

I believe i am having a similar issue. any news?


This comment has been minimized.

Copy link

commented Apr 9, 2019

I also have this issue when i have one credential and is saved using web login.
The -UseWebLogin should have also the -ClearTokenCache used with the -SPOManagementShell to clear and give the option to choose another account.


This comment has been minimized.

Copy link

commented Apr 9, 2019

-SPOManagementShell should be the same - as it reuses the same adal app. As for -UseWebLogin it's stored in the IE cache and impossible to clear/control in Windows 10 :( I have really tried. Web login usually works fine as long as you never check "remember me" ever. Can this be closed now?


This comment has been minimized.

Copy link

commented Apr 9, 2019

Thanks. I do believe this should just be the default behavior (to use ADAL) with the increasing number of deployments of MFA and strong recommendation by Microsoft to leverage MFA. It makes little sense to use classic credentials in any context with SPO, at this point.

@tseward tseward closed this Apr 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.