Connect-SPOService WebException 401 unauthorized

I am site collection admin and getting below error

PS C:\Windows\system32> Connect-SPOService -url xyz-admin.sharepoint.com/.../poc -credential *** Email address is removed for privacy ***
Connect-SPOService : The remote server returned an error: (401) Unauthorized.
At line:1 char:1
+ Connect-SPOService -url xyz-admin.sharepoint.com/.../p ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Connect-SPOService], WebException
    + FullyQualifiedErrorId : System.Net.WebException,Microsoft.Online.SharePoint.PowerShell.ConnectSPOService

Thanks

Answer
Answer

Hi Celerity,

Without SharePoint Online global administrator role, it is not feasible to run SharePoint Online management shell. We would suggest you contact your Company administrators to discuss if they can assign the related role to you.

Your understanding is highly appreciated.

Sky Pei

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Answer
Answer

Hi Celerity,

Yes, the command should be Connect-SPOService -url xyz-admin.sharepoint.com/ -credential  SharePointOnlineglobaladministrator@xyz.com.

In addition, the article Connect-SPOService has also explained clearly that SharePoint Online management shell should be operated by SharePoint Online global administrator other than a site collection administrator.

Thanks for your understanding.

Sky Pei

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated March 30, 2024 Views 8,863 Applies to: