[Solved] Current site is not a tenant administration site error in SharePoint Online PowerShell
Check out Best Alternative to InfoPath -> Try Now
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 firstname.lastname@example.org
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:
Solution to 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@example.com
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?
- Get Sites, Web, and List information from SharePoint Online site using PowerShell
- 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
Hope this will be helpful to resolve current site is not a tenant administration site error in SharePoint Online PowerShell.
SharePoint Online FREE Training
JOIN a FREE SharePoint Video Course (3 Part Video Series)