Problem description
The Sharepoint online site backup has failed with error “Access to this site has been blocked. Please contact the administrator to resolve this problem.”
Traceback:
Sample traceback/logs from Activity stream logs :
[2023-10-26 10:02:58,429] [ERROR] Error getting site collection selective properties for url=/sites/testmodern, Error=Unable to read file. Permission Denied Response Code: 403 Text: (#100000046) (Error Code : MS70)
[2023-10-26 10:02:58,521] [ERROR] Error while fetching site details for site=fbdc3b8d-c705-4d68-be83-193a58e9843f Error={u'error': {u'innerError': {u'date': u'2023-10-26T10:02:58', u'request-id': u'c44542bc-d929-4be1-b9df-4921bd70135e', u'code': u'resourceLocked', u'client-request-id': u'ab2701c5-038e-4988-bdad-3e1ef824decf'}, u'message': u'Access to this site has been blocked. Please contact the administrator to resolve this problem.', u'code': u'notAllowed'}} (#100010001) (Error Code : SPO1)
[2023-10-26 10:02:58,524] [ERROR] SharePoint Site Collection Backup failed, error_code=4294967566, reason=Requested site collection does not exist. (#10000010e)
Cause:
Access to the site has been blocked in Microsoft 365.
How to verify the site access has been blocked in Microsoft 365 ?
Access the site URL on a browser , you will receive the error : 403 FORBIDDEN
Example:
Access the Sharepoint Admin center -> Active Sites -> Click on the site in question -> You will get a dialogue box “
Resolution :
The site needs to be unlocked using the Sharepoint online management shell / a powershell with Microsoft.Online.SharePoint.PowerShell module installed.
Steps to be followed :
Open Powershell as administrator
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Connect-SPOService <URL of Sharepoint admin center>
Example : Connect-SPOService https://krishna-admin.sharepoint.com
On the sign in prompt , please use Microsoft Global admin/Sharepoint admin credentials
Set-SPOSite -Identity <URL of the site which is locked> -Lockstate Unlock -NoWait
After the successful completion of the above powershell command , the site would be unlocked.
Reference articles :