Forum Discussion

Takeru_Ishikawa's avatar
Takeru_Ishikawa
Copper Contributor
Nov 14, 2019
Solved

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

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

  • Beau Cameron's avatar
    Beau Cameron
    Nov 18, 2019

    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.

7 Replies

  • O365Developer's avatar
    O365Developer
    Brass Contributor

    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/

     

     

     

     

    • Takeru_Ishikawa's avatar
      Takeru_Ishikawa
      Copper Contributor

      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

       

       

      • O365Developer's avatar
        O365Developer
        Brass Contributor

        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.

         

         

Resources