SOLVED

Is there alternate "Get-SPOSite" if I'm not a global administrator?

Copper Contributor

Hi all,

 

I'd like to retrieve a sub-site information.

I have full control sub-site permission, but I don't have global administrator one.

My goal is to retrieve links on sub-sites' pages on SharePoint Online by cmdlet.

I input "Get-SPOSite" but I got an error "Use Connect-SPOService before running this CmdLet." that requires global permission.

Is there alternate "Get-SPOSite" if I'm not a global administrator?

 

Your support is highly appreciated.

 

Best Regards,

Takeru Ishikawa

7 Replies

@Takeru_Ishikawa 

 

Hi ,

 

Could you please tell me the error ,what you are getting for Connect-SPOService?

 

Please refer to this article for reference

https://www.codetwo.com/admins-blog/connect-to-sharepoint-online-using-powershell/

 

 

 

 

@O365Developer 

 

Hi,

Thank you for the reply.

I'm a sub-site administrator, not global one.

 

Input: Connect-SPOService -url https://***-admin.sharepoint.com
Output:Connect-SPOService : Current user is not a tenant admin.
発生場所 行:1 文字:1
+ Connect-SPOService -url https://***-admin.sharepoint.com
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-SPOService], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.ConnectSPOService

 

 

@Takeru_Ishikawa 

 

Hi Takeru

 

Assuming you are giving your tenant admin url in the connect-spo service.

I think you need to have atleast a delegated admin access to the tenant,in order to execute it.

 

 

@O365Developer 

 

Hi,

Thank you for the advise.

I'll find anther way.

 

Thank you,

Takeru Ishikawa

best response confirmed by Takeru_Ishikawa (Copper Contributor)
Solution

@Takeru_Ishikawa If you use PnP PowerShell Scripts, you can connect to your sites without being a Tenant Admin. Not sure what commands you are looking for... but I'd check the PnP module and see if they have what you need.

@Beau Cameron 

Hi,
My purpose is to get links on sub-site pages.
"Get-SPOSite" or alternate cmdlet is good because their output have strings including HTML link tags.
My understanding is PnP command is a combination of commmands so it also needs tenant admin permisisson.
Then, I will serch PnP commands.
 
Thank you,
Takeru Ishikawa

@Takeru_Ishikawa You don't need Tenant Permissions with PnP. You can connect to a specific site collection and all the sub sites of the site collection. 

1 best response

Accepted Solutions
best response confirmed by Takeru_Ishikawa (Copper Contributor)
Solution

@Takeru_Ishikawa If you use PnP PowerShell Scripts, you can connect to your sites without being a Tenant Admin. Not sure what commands you are looking for... but I'd check the PnP module and see if they have what you need.

View solution in original post