In this PowerShell SharePoint tutorial, we will discuss how to solve the error, Connect-SPOService : Current site is not a tenant administration site. Recently, I was working with PowerShell SharePoint and trying to connect to SharePoint online site from SharePoint online management shell, but I got an error which says: Connect-SPOService: Current site is not a tenant administration site.
We were providing the credentials of my Office 365 account but still, It was giving the error. And the Office 365 account which we were using is an Office 365 tenant administrator account. So there were no issues regarding permission. But still, current site is not a tenant administration site error was coming.
If you are new to SharePoint Online management shell, read How to connect to SharePoint online site using SharePoint Online Management Shell?
Below is the SharePoint online management shell command:
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
+ CategoryInfo : NotSpecified: (:) [Connect-SPOService], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.ConnectSPOService
The error looks like below:
Connect-SPOService : Current site is not a tenant administration site
To connect to the SharePoint Online site using PowerShell, we need to provide the Sharepoint Online Administration Center site URL. The SharePoint online admin center site URL will be like below:
https://<your tenant id>-admin.sharepoint.com/
Whenever you will sign up for an Office 365 trial, the Office 365 SharePoint admin site will be created automatically. So the PowerShell command will be like below:
Connect-SPOService -Url https://onlysharepoint2013-admin.sharepoint.com/ -credential [email protected]
Now when you will run the above command the error will not come. You will not receive any error related to Connect-SPOService Current site is not a tenant administration site.
You may also like the following SharePoint Online PowerShell tutorials:
- How to upload files to SharePoint using PowerShell
- PowerShell SharePoint list operations
- PowerShell SharePoint site collection example
- How to Change SharePoint Site Logo + PowerShell
- Get sharepoint site template PowerShell
- How to remove SharePoint Online Modern Page Title using PowerShell
- How to get file modification time and date using PowerShell
- How to activate SharePoint Publishing Feature Programmatically using CSOM and PowerShell
- How to use PnP PowerShell in SharePoint Online
Hope this will be helpful to solve an error Connect-SPOService : Current site is not a tenant administration site in SharePoint Online Office 365.
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Out audiences are from the United States, Canada, United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a SharePoint MVP(8 times), check out My MVP Profile. I have also worked in companies like HP, TCS, KPIT, etc.