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