Why i am been automatically login when running this command “Connect-PnPOnline -UseWebLogin"

Steel Contributor

I run the following PnP command:-


Connect-PnPOnline -Url "https://***.sharepoint.com/sites/ApprovalProcess/" -UseWebLogin

now a dialog will open and login me automatically, and when i try to perform any action i will get access denied... so seem i am been login using different username.. so how i can force the above command to ask me for the username and password and without logging me in automatically..

1 Reply

@john john 

Update your PnP PowerShell modules to latest version and try using below command:



Connect-PnPOnline -Url "https://***.sharepoint.com/sites/ApprovalProcess/" -UseWebLogin -ForceAuthentication



ReferenceTwitter post by official PnP PowerShell account 

Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.