In this post we will discuss how to resolve error "Could not connect to SharePoint Online" which usually comes while executing PowerShell command in SharePoint Online 2013.
Also you can check out:
Recently when I was trying to connect to the SharePoint Online Administration Center by using the below PowerShell command I got the above error.
The PowerShell command I was executing was Connect-SPOService -Url "http://enjoysharepoint.sharepoint.com/Sites/MyTestSite" -Credential "email@example.com"
And the error I was getting as Connect-SPOService : Could not connect to SharePoint Online....
The problem was that I was not giving the proper URL. When I gave the proper URL it started working.
Connect-SPOService -Url "http://enjoysharepoint-admin.sharepoint.com/Sites/MyTestSite" -Credential "firstname.lastname@example.org"
Hope it will work for you !!!