Connect-SPOService: Current site is not a tenant administration site

I recently wanted to administer SharePoint online sites using PowerShell. I installed the Sharepoint Online Management shell and then used the command Connect-SPOService. Connect-SPOService -url https://mylab000.sharepoint.com/. The URL in the command is for one of my SharePoint online sites.

Error
connect-sposervice : Current site is not a tenant administration site.
At line:1 char:1
connect-sposervice -url https://mylab000.sharepoint.com
~~~~~~~~~~~ CategoryInfo : NotSpecified: (:) [Connect-SPOService], ServerException
FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.Conne
ctSPOService
Current site is not a tenant administration site
Current site is not a tenant administration site

Fix for Current site is not a tenant administration site error

To fix this issue, Instead of using the SharePoint site URL. You will need to use the Sharepoint Online admin center URL to connect. Replace the Sharepoint Site URL with the Sharepoint admin URL and then try again using the same command. To get the admin URL, you will need to follow below steps:

  • Sign in to the Microsoft 365 admin center.
  • Click on Sharepoint Under Admin Centers.
Sharepoint admin center from M365 portal
Sharepoint admin center from M365 portal
  • The next step is to check the browser’s address bar to find the Sharepoint Online Admin URL. Use this URL to connect to Sharepoint online from PowerShell using Connect-SPOService. Notice that this URL contains admin in the name.
Copy Sharepoint Online admin URL
Copy Sharepoint Online admin URL
  • Now try to connect to the Sharepoint Online site and use the commands, e.g., get-sposite, to verify the connection.
Connect-SPOService with sharepoint admin center URL
Connect-SPOService with SharePoint admin center URL

Read Next

Leave a Comment