Fix “Connect-SPOService : Current site is not a tenant administration site.” Error in SharePoint Online Management Shell
Problem: When trying to connect to SharePoint Online using SharePoint Online Management Shell, I got an error message: “Connect-SPOService : Current site is not a tenant administration site.”
Root Cause and Solution:
The script was trying to connect to SharePoint Online as: “Connect-SPOService -Url https://crescent.sharepoint.com”, But the problem is: It should connect to admin center URL rather than SharePoint Online site URL! That is, the URL parameter must be:
“https://<yourdomain>-admin.sharepoint.com” instead of “https://<yourdomain>.sharepoint.com“
So make sure you connect to the SharePoint Online Admin Center instead of the SharePoint Online site. The corrected script is: Connect-SPOService -Url https://<yourdomain>-admin.sharepoint.com
Thanks, it helps!!!
Thanks