In this SharePoint Online PowerShell tutorial, learn how to solve current site is not a tenant administration site error which comes in SharePoint Online while connecting to SharePoint Online from PowerShell.
Recently while connecting to SharePoint online site from PowerShell, I got an error like below:
Connect-SPOService: Current site is not a tenant administration site.
In PowerShell, I was providing the credentials which are a which is my Office 365 tenant administrator account. So there were no issues regarding permission.
Here I run the command like below:
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], ServerEx
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Micr
The error looks like below:
Connect-SPOService : current site is not a tenant administration site
To connect to SharePoint Online site from PowerShell, we need to provide SharePoint Online admin URL. The SharePoint Online Administration Center site URL will be like below:
The admin site will be created automatically when you will sign up for an Office 365 subscription. 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 like following SharePoint PowerShell tutorials:
- Getting Started with PnP PowerShell – SharePoint 2013/2016/SharePoint Online
- How to Set up your SharePoint 2013 Online Management Shell to connect to SharePoint online sites?
- Bulk SharePoint Online Site Collection Creation using PowerShell
- Upload document using PowerShell Remotely
- Top 51 PowerShell Examples You Should Learn
- SharePoint 2016 PowerShell Script to list all Users in Site Collection
- Steps to Increase SharePoint Online Storage Quota using PowerShell
- Delete list items created before N days using PowerShell in SharePoint Online
I hope this will be helpful to resolve the current site is not a tenant administration site error in SharePoint Online PowerShell.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com