Forum Discussion

Nigel Witherdin's avatar
Nigel Witherdin
Iron Contributor
Mar 14, 2018
Solved

SharePoint Online Unlocking a Site set to No Access

Hey,

Investigating how we could archive site collections in place on SharePoint Online, I used the PnP PowerShell cmdlet:

Set-PnPTenantSite -Url <site coll url> -LockState NoAcces -Wait

This locked the site, and removed access to it (which is a little more then what I wanted). My big concern now is that I cannot unlock it as my admin account and our SharePoint service account no longer have access to the site! 

 

Running the cmdlet

Set-PnPTenantSite -Url <site coll url> -LockState Unlock -Wait

under the same admin account that locked it gives me 'access forbidden' - as does our "service" admin account (which should be the primary administrator on the site).

The site collection is presented in the SharePoint admin center (with a padlock icon), but I am unable to select it.

 

Am I missing something? Do I need to use a tenancy global admin account?

 

Thanks!

  • Anonymous's avatar
    Anonymous
    Mar 14, 2018
    Try
    Connect-SPOService -Url https://tenant-admin.sharepoint.com
    Set-SPOSite -Identity https://tenant.sharepoint.com/sites/sitecollection -LockState "Unlock"

10 Replies

  • Anonymous's avatar
    Anonymous
    Yeah, if your not on a global admin account most likley you'll need to be added back as a site collection admin by one before you can make changes to that site collection.
    • Nigel Witherdin's avatar
      Nigel Witherdin
      Iron Contributor

      Hey,

       

      Went and saw someone who has global tenancy admin access - and he couldn't select the site in the SharePoint Admin Control panel either ?!?

       

      Anyone have any ideas before I go raise an MS ticket

       

      Thanks

      • Nigel Witherdin's avatar
        Nigel Witherdin
        Iron Contributor

        Still no good - tried getting him to connect to the site via PowerShell (access denied), then by connecting to the tenancy (the *-admin.sharepoint.com url) and running the "Set-PnPTenantSite" cmdlet on that site and he got "Set-PnPTenantSite : Access to this Web site has been blocked."

         

         

Resources