Connect-SPOService : current site is not a tenant administration site.

When working with SharePoint Online using PowerShell, you may encounter the error message: “Connect-SPOService: Current site is not a tenant administration site.” This error occurs when you attempt to connect to SharePoint Online using an incorrect URL format.

connect-sposervice : current site is not a tenant administration site

Let me tell you the reason why this error usually comes.

This error typically occurs when you connect to a regular SharePoint site instead of the SharePoint Online admin center. The Connect-SPOService cmdlet is specifically designed to connect to tenant administration sites, not regular team sites or other SharePoint sites.

Here are a few reasons for this error:

  1. Using a regular SharePoint site URL instead of the admin URL
  2. Incorrect URL format when connecting to SharePoint Online
  3. Attempting to connect without sufficient administrative privileges

I recently connected to a SharePoint Online site using SharePoint management shell where I got the error: connect-sposervice : current site is not a tenant administration site.

I was using the below PowerShell script.

Connect-SPOService -Url https://onlysharepoint2013.sharepoint.com/ -credential [email protected]

Then I got the below error.
Connect-SPOService : Current site is not a tenant administration site.
At line:1 char:1
+ Connect-SPOService -Url
https://onlysharepoint2013.sharepoint.com/sites/SPTraini …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-SPOService], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.ConnectSPOService

You can see the screenshot below for the exact error message.

Connect-SPOService Current site is not a tenant administration site

As you can see clearly, I was not providing the tenant administration site but a SharePoint Online team site.

So, to fix the error, you need to modify your URL to point to the tenant administration site.

Here’s the correct format:

Connect-SPOService -Url "https://yourtenant-admin.sharepoint.com"

Instead of:

Connect-SPOService -Url "https://yourtenant.sharepoint.com"

Here is the modified script:

Connect-SPOService -Url https://onlysharepoint2013-admin.sharepoint.com/ -credential [email protected]

Now, when you run the script, you will not see the error.

Here are some common mistakes you can avoid:

  • Attempting to use Connect-SPOService with a team site URL
  • Forgetting to include the “-admin” in your SharePoint URL
  • Using an account without sufficient administrative privileges
  • Using the wrong URL format (like “.com” instead of “.com/” or other small typos)

I hope you got it now. How to fix the error: connect-sposervice : current site is not a tenant administration site. Do let me know in the comments below if this helps.

You may also like:

  • Using Connect-SPOService with a credential prevented me to see that my password was expired. Using it directly enabled me to see that was the problem, change my password and then successfully connect

  • Hi,

    i am trying to create some folders in a perticular sharepoint subsite..i am getting the error while connecting. but i am able to connect to main site…

    could you please help and give me the script to make the changes on subsites post connected to main site?

  • >

    Build a High-Performance Project Management Site in SharePoint Online

    User registration Power Apps canvas app

    DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

    Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

    Power Platform Tutorial FREE PDF Download

    FREE Power Platform Tutorial PDF

    Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…