question

BechirAllani-1866 avatar image
0 Votes"
BechirAllani-1866 asked BechirAllani-1866 answered

SharePoint Online – Time interval where Delete Sites are completly deleted

Hi Microsoft SharePoint Online Community

In one of our process we are deleting a site collection from "Active Sites" than permanently deleting from "Deleted Sites" based on the "SharePoint Admin Center".

Just After deleting the site from "Deleted Sites" we are creating the same site again with same title, users, groups and some custom actions. All these actions are REST API and CSOM based.

The site creation process works fine, the problem what we are getting, is that the process is often failing, and it is failing in different stages when we try to reproduce the scenario.

Here are some REST API logs:
Microsoft.SharePoint.Client.ServerException: Cannot get site https://XXXXX.sharepoint.com/sites/XXX
Error while setting the site https://XXXXX.sharepoint.com/sites/XXX as Read Only in SharePoint Online
Microsoft.SharePoint.Client.ServerException: The object id "site:fa9e246a-523e-4d3d-a769-2d1e18057cca:web:4dcb967c-9a5e-4367-bc0e-d3cf7a49da75" is invalid

But some how, if we wait for some X time, the site creation process is working fine.

My Feeling that the site deletion in background is not 100% done after deleting the site from "Deleted Sites", it could be that there is some naming conflicts are there....

As we are in SharePoint Online is hard to truck some kind of actions. that is why I am asking here, if somebody could validate my theorie and give us some advice.

Thank you in advance

office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AllenXu-MSFT avatar image
0 Votes"
AllenXu-MSFT answered

Hi @BechirAllani-1866,

Yes, your feeling is totally right. There are some timer jobs in the backend to control the site deletion process like what is in SharePoint on-premise. The difference is that we can manage those timer jobs in SharePoint on-premise, however, in SharePoint Online, there is no way to force the timer job execution or any kind of workaround, since we don’t have control of backend timer jobs which is managed by Microsoft.

As per my experience, it might take up to 24 hours for the completion of site deletion process. So, just be patient and recreate the site 24 hours after deleting it.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BechirAllani-1866 avatar image
0 Votes"
BechirAllani-1866 answered

Thank you for your Feedback

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.