Sunday, 21 July 2019

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

Problem :

You might have received the below error when you try to connect your SharePoint Online site using Connect-SPOService cmdlet.
Connect-SPOService : Current site is not a tenant administration site.
At line:1 char:1
+ Connect-SPOService -Url https://TenantName.sharepoint.com/sites/SiteName
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Connect-SPOService], ServerException
    + FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.Conne
   ctSPOService

Fix/Soution:

The URL parameter of the Connect-SPOService cmdlet accepts only the url of SharePoint Online Administration Center site. To work with any of your site using SharePoint Online PowerShell module, you have to first establish a connection with SPO tenant site which is the admin site of your SharePoint tenant in Office 365, once this connection is established you can access any SPOSite using Get-SPOSite cmdlet.
Connect-SPOService -Url https://TenantName-admin.sharepoint.com
Once you connected your Admin site, you can get your required SPO site details using the below command.
Get-SPOSite -Identity https://TenantName.sharepoint.com/sites/SiteName
You can set required details in SPO site using the below command
Set-SPOSite -Identity https://TenantName.sharepoint.com/sites/SiteName -Owner username@domain.com -NoWait
For more details read How to Connect SharePoint Online PowerShell Module.

Advertisements
Advertisements

No comments:

Post a Comment