Home

Connect-SPOService : Could not authenticate to SharePoint Online

%3CLINGO-SUB%20id%3D%22lingo-sub-931201%22%20slang%3D%22en-US%22%3EConnect-SPOService%20%3A%20Could%20not%20authenticate%20to%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-931201%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20unable%20to%20connect%20to%20SPO%20from%20SharePoint%20online%20management%20shell%26nbsp%3B%20using%20my%20account.%26nbsp%3B%20MFA%20is%20enabled.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EConnect-SPOService%20-url%20https%3A%2F%2F%5BURL%5D.sharepoint.com%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20getting%20the%20following%20response%3A%3C%2FP%3E%3CP%3EConnect-SPOService%20%3A%20Could%20not%20authenticate%20to%20SharePoint%20Online%20https%3A%2F%2F%5BURL%5D.sharepoint.com%2F%20using%20OAuth%202.0%3CBR%20%2F%3EAt%20line%3A1%20char%3A1%3CBR%20%2F%3E%2B%20Connect-SPOService%20-url%20https%3A%2F%2F%5BURL%5D.sharepoint.com%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BConnect-SPOService%5D%2C%20AuthenticationException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.Online.SharePoint.PowerShell.AuthenticationException%2CMicrosoft.Online.SharePoi%3CBR%20%2F%3Ent.PowerShell.ConnectSPOService%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20help%20with%20this%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-931201%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAuthentication%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIdentity%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-938109%22%20slang%3D%22en-US%22%3ERe%3A%20Connect-SPOService%20%3A%20Could%20not%20authenticate%20to%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-938109%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F431451%22%20target%3D%22_blank%22%3E%40ajames950%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EConsidering%20%5BURL%5D%20part%20stands%20for%20the%20organization%20name%2C%20try%20connecting%20by%20using%20the%20cmdlet%20as%20below%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3EConnect-SPOService%20-Url%20https%3A%2F%2F%5BURL%5D-admin.sharepoint.com%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20it%20fails%20too%2C%20you%20can%20uninstall%20the%20module%20and%20reinstall%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3CBR%20%2F%3EBurak%20V.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1013573%22%20slang%3D%22en-US%22%3ERe%3A%20Connect-SPOService%20%3A%20Could%20not%20authenticate%20to%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1013573%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F431988%22%20target%3D%22_blank%22%3E%40Burak_Varol%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1013574%22%20slang%3D%22en-US%22%3ERe%3A%20Connect-SPOService%20%3A%20Could%20not%20authenticate%20to%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1013574%22%20slang%3D%22en-US%22%3EThanks%2C%20it%20worked%3C%2FLINGO-BODY%3E
ajames950
Occasional Visitor

Hi All!

 

I am unable to connect to SPO from SharePoint online management shell  using my account.  MFA is enabled.

 

Connect-SPOService -url https://[URL].sharepoint.com

 

I'm getting the following response:

Connect-SPOService : Could not authenticate to SharePoint Online https://[URL].sharepoint.com/ using OAuth 2.0
At line:1 char:1
+ Connect-SPOService -url https://[URL].sharepoint.com
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-SPOService], AuthenticationException
+ FullyQualifiedErrorId : Microsoft.Online.SharePoint.PowerShell.AuthenticationException,Microsoft.Online.SharePoi
nt.PowerShell.ConnectSPOService

 

Can anyone help with this? 

 

Thanks. 

3 Replies

Hi @ajames950,

 

Considering [URL] part stands for the organization name, try connecting by using the cmdlet as below:

 

 

Connect-SPOService -Url https://[URL]-admin.sharepoint.com

 

 

If it fails too, you can uninstall the module and reinstall it.

 

Regards,
Burak V.

Related Conversations
Sharing an excel sheet public link
shunde3 in Microsoft Teams on
6 Replies
Reporting on Project Online (PWA) Timesheets
Andy Dennis in Project on
3 Replies
Adding a user or sending download link
Scott Mackay in Office 365 on
8 Replies
Cutomizing SharePoint Online Modern Page
Vikas Dhingra in SharePoint on
4 Replies