Cannot connect to SharePoint Online with PowerShell

Share on twitter
Share on linkedin
Share on facebook
Share on stumbleupon
Share on xing
Share on email
Share on print


When you try to connect to SharePoint Online using PowerShell you receive an Access Denied error as follows:

PS C:\> Connect-SPOService -Url -credential $credential Connect-SPOService : Cannot contact web site'' or the web site does not supportSharePoint Online credentials. The response status code is 'Unauthorized'. Theresponse headers are 'X-SharePointHealthScore=0,SPRequestGuid=310ce59d-002b-3000-ef1a-70e5fe7eaf72,request-id=310ce59d-002b-3000-ef1a-70e5fe7eaf72, X-MSDAVEXT_Error=917656; Access+denied.+Before+opening+files+in+this+location%2c+you+must+first+browse+to+the+web+site+and+select+the+option+to+login+automatically.,


Connecto to the SPO Service without the previously entered credentials ($credential) and enable the LegacyAuthProtocolsEnabled attribute.

Set-SPOTenant -LegacyAuthProtocolsEnabled $True


Enjoy SharePoint Online.



%d Bloggern gefällt das: