SOLVED
Home

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

%3CLINGO-SUB%20id%3D%22lingo-sub-1010178%22%20slang%3D%22en-US%22%3EIs%20there%20alternate%20%22Get-SPOSite%22%20if%20I'm%20not%20a%20global%20administrator%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1010178%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'd%20like%20to%20retrieve%20a%20sub-site%20information.%3C%2FP%3E%3CP%3EI%20have%20full%20control%20sub-site%20permission%2C%20but%20I%20don't%20have%20global%20administrator%20one.%3C%2FP%3E%3CP%3EMy%20goal%20is%20to%20retrieve%20links%20on%20sub-sites'%20pages%20on%20SharePoint%20Online%20by%20cmdlet.%3C%2FP%3E%3CP%3EI%20input%20%22Get-SPOSite%22%20but%20I%20got%20an%20error%20%22Use%E3%80%80Connect-SPOService%20before%20running%20this%20CmdLet.%22%20that%20requires%20global%20permission.%3C%2FP%3E%3CP%3EIs%20there%20alternate%20%22Get-SPOSite%22%20if%20I'm%20not%20a%20global%20administrator%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20support%20is%20highly%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20Regards%2C%3C%2FP%3E%3CP%3ETakeru%20Ishikawa%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1010306%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20alternate%20%22Get-SPOSite%22%20if%20I'm%20not%20a%20global%20administrator%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1010306%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F410017%22%20target%3D%22_blank%22%3E%40Takeru_Ishikawa%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20please%20tell%20me%20the%20error%20%2Cwhat%20you%20are%20getting%20for%20Connect-SPOService%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20refer%20to%20this%20article%20for%20reference%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.codetwo.com%2Fadmins-blog%2Fconnect-to-sharepoint-online-using-powershell%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.codetwo.com%2Fadmins-blog%2Fconnect-to-sharepoint-online-using-powershell%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1010312%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20alternate%20%22Get-SPOSite%22%20if%20I'm%20not%20a%20global%20administrator%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1010312%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F453843%22%20target%3D%22_blank%22%3E%40O365Developer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20reply.%3C%2FP%3E%3CP%3EI'm%20a%20sub-site%20administrator%2C%20not%20global%20one.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInput%3A%20Connect-SPOService%20-url%20https%3A%2F%2F***-admin.sharepoint.com%3CBR%20%2F%3EOutput%3AConnect-SPOService%20%3A%20Current%20user%20is%20not%20a%20tenant%20admin.%3CBR%20%2F%3E%E7%99%BA%E7%94%9F%E5%A0%B4%E6%89%80%20%E8%A1%8C%3A1%20%E6%96%87%E5%AD%97%3A1%3CBR%20%2F%3E%2B%20Connect-SPOService%20-url%20https%3A%2F%2F***-admin.sharepoint.com%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BConnect-SPOService%5D%2C%20ServerException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.SharePoint.Client.ServerException%2CMicrosoft.Online.SharePoint.PowerShell.ConnectSPOService%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1010326%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20alternate%20%22Get-SPOSite%22%20if%20I'm%20not%20a%20global%20administrator%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1010326%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F410017%22%20target%3D%22_blank%22%3E%40Takeru_Ishikawa%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Takeru%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAssuming%20you%20are%20giving%20your%20tenant%20admin%20url%20in%20the%20connect-spo%20service.%3C%2FP%3E%3CP%3EI%20think%20you%20need%20to%20have%20atleast%20a%20delegated%20admin%20access%20to%20the%20tenant%2Cin%20order%20to%20execute%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1014241%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20alternate%20%22Get-SPOSite%22%20if%20I'm%20not%20a%20global%20administrator%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1014241%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F453843%22%20target%3D%22_blank%22%3E%40O365Developer%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20advise.%3C%2FP%3E%3CP%3EI'll%20find%20anther%20way.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3CP%3ETakeru%20Ishikawa%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1014766%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20alternate%20%22Get-SPOSite%22%20if%20I'm%20not%20a%20global%20administrator%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1014766%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F410017%22%20target%3D%22_blank%22%3E%40Takeru_Ishikawa%3C%2FA%3E%26nbsp%3BIf%20you%20use%20PnP%20PowerShell%20Scripts%2C%20you%20can%20connect%20to%20your%20sites%20without%20being%20a%20Tenant%20Admin.%20Not%20sure%20what%20commands%20you%20are%20looking%20for...%20but%20I'd%20check%20the%20PnP%20module%20and%20see%20if%20they%20have%20what%20you%20need.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1016124%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20alternate%20%22Get-SPOSite%22%20if%20I'm%20not%20a%20global%20administrator%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1016124%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F39836%22%20target%3D%22_blank%22%3E%40Beau%20Cameron%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CFONT%3EHi%2C%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%3EMy%20purpose%20is%20to%20get%20links%20on%20sub-site%20pages.%3CBR%20%2F%3E%22Get-SPOSite%22%20or%20alternate%20cmdlet%20is%20good%20because%20their%20output%20have%20strings%20including%20HTML%20link%20tags.%3CBR%20%2F%3EMy%20understanding%20is%20PnP%20command%20is%20a%20combination%20of%20commmands%20so%20it%20also%20needs%20tenant%20admin%20permisisson.%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%3EThen%2C%20I%20will%20serch%20PnP%20commands.%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CFONT%3EThank%20you%2C%3CBR%20%2F%3ETakeru%20Ishikawa%3C%2FFONT%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1020578%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20alternate%20%22Get-SPOSite%22%20if%20I'm%20not%20a%20global%20administrator%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1020578%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F410017%22%20target%3D%22_blank%22%3E%40Takeru_Ishikawa%3C%2FA%3E%26nbsp%3BYou%20don't%20need%20Tenant%20Permissions%20with%20PnP.%20You%20can%20connect%20to%20a%20specific%20site%20collection%20and%20all%20the%20sub%20sites%20of%20the%20site%20collection.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Takeru_Ishikawa
Occasional 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

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. 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies