pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
990 stars 663 forks source link

Can't authenticate with Connect-pnpOnline #2840

Open poidah opened 4 years ago

poidah commented 4 years ago

I've been accessing my test tenant with PnP for years but today I have not been able to connect.

The authentication dialog prompts me for a username and password but then doesn't dissapear, it remains open and the SharePoint site actually loads in it. Closing the dialog manually results in either a null reference error or a failed authentication message.

The account I'm using is a cloud account. The account is the global admin for the tenant. There is no MFA.

Option 1 Connect-PnPOnline -url "http://[TENANTNAME].sharepoint.com" -UseWebLogin

image

image

Option 2 $username = "admin@[TENANTNAME].onmicrosoft.com" $password = get-content | ConvertTo-SecureString $Credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username,$Password Connect-PnPOnline -url "http://[TENANTNAME].sharepoint.com" -Credentials $Credentials

image

These are the versions of the PNP I have available image

They were installed with Install-Module

This is the version of powershell I'm using image

My colleagues have reported the same thing when I asked them to try using their PCs