Forum Discussion

Dean_Gross's avatar
Dean_Gross
Silver Contributor
Nov 27, 2017

Connecting to PnPOnline - Not prompted to login

I have a script with Connect-PnPOnline $tenantUrl -UseWebLogin and when I ran it this morning, I was not prompted to login to the tenant. I had not accessed the tenant for over 5 days using powershell. I had logged in using Chrome earlier today. 

Would the PnP cmdlet be using those credentials?

is this expected behavior?

 

Erwin van Hunen

 

  • The last time you logged in with -UseWebLogin, did you by any chance answer yes to the question 'Stay signed in?' If so, yes, that is expected. It's not PnP PowerShell controlling that, it's the combination of browser and cookies (that's effectively what UseWebLogin is doing: it's using an embedded browser)
  • The last time you logged in with -UseWebLogin, did you by any chance answer yes to the question 'Stay signed in?' If so, yes, that is expected. It's not PnP PowerShell controlling that, it's the combination of browser and cookies (that's effectively what UseWebLogin is doing: it's using an embedded browser)

Resources