Skip to content

/errors/sharepoint-online/current-site-is-not-a-tenant-administration-site

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

The commands on this page have not been executed by our verification runner yet.updated
tool
SharePoint Online PowerShell
versions
Microsoft.Online.SharePoint.PowerShell 16.0.x
os
windows

Connect-SPOService : Current site is not a tenant administration site. means the URL you passed is a SharePoint site, not the SharePoint admin center. Connect-SPOService only connects to the admin center, whose host name is the tenant name followed by -admin:

powershell
Connect-SPOService -Url https://contoso-admin.sharepoint.com
URLWorks with Connect-SPOService
https://contoso-admin.sharepoint.comYes: admin center
https://contoso.sharepoint.comNo: root site
https://contoso.sharepoint.com/sites/financeNo: a site collection
https://contoso-my.sharepoint.comNo: OneDrive host

Find the tenant name

The tenant name is the first part of the initial domain contoso.onmicrosoft.com, not your email domain. Open the SharePoint admin center in a browser from the Microsoft 365 admin center (Admin centers > SharePoint) and copy the host name from the address bar; it is the value for -Url.

Other sign-in requirements

Connect-SPOService signs in a SharePoint Administrator (or SharePoint Embedded Administrator). An account without that role cannot use the admin center even with the right URL.

Sign-inCommand
Interactive (MFA)Connect-SPOService -Url https://contoso-admin.sharepoint.com
Browser via MSALConnect-SPOService -Url https://contoso-admin.sharepoint.com -UseSystemBrowser $true
App-only with a certificateConnect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId APP_ID -TenantId TENANT_ID -CertificateThumbprint THUMBPRINT
Managed identityConnect-SPOService -Url https://contoso-admin.sharepoint.com -ManagedIdentity
GCC High / DoDadd -Region ITAR

After a successful connection, Get-SPOTenant returns the tenant settings; until then other SPO cmdlets fail with No connection available.

Sources