Connect-SPOService : Could not connect to SharePoint Online.

I am trying to connect the SharePoint Online service by using the cmdlet Connect-SPOService after importing SharePoint Online PowerShell module, but I am receiving the error ‘Connect-SPOService : Could not connect to SharePoint Online.’.

PowerShell Command:

Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
Connect-SPOService –Url https://tenant-admin.sharepoint.com –Credential [email protected]

Receiving below error:

Connect-SPOService : Could not connect to SharePoint Online.
At line:1 char:1
+ Connect-SPOService –Url https://tenant-admin.sharepoint.com –Credential admin@te ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Connect-SPOService], InvalidOperationException
    + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.Online.SharePoint.PowerShell.ConnectSPOService

Fix/Solution:

For me, the problem was due to invalid credentials. Yes, I have entered the wrong password, after providing the correct username and password, the issue was solved for me. You might also receive this error due to incorrect Admin url. So you have to carefully check the Admin url (the url should be like this: https://tenant-admin.sharepoint.com).

Advertisement

Leave a Comment