Please follow below scenario using your browser: ( I tried in IE and Firefox)
- Go to http://-admin.SharePoint.com
- Login as administrator
- Try to delete a site collection Note: You can delete a site even when you are not the admin (you don’t have access to the site)
- Try to Restore the site Note: You are able to restore the site even when you are not admin (you don’t have access to the site)
- Try to run an existing workflow after restoring the site -> you can run the workflow without any issue.
Now if we do the same scenario using Microsoft.Online.SharePoint.Client.Tenant.dll behaviour is different:
in other word, using tenant.dll only an administrator, who is not the admin of the site collection is not able to delete the site collection, which is quite useless ...
- You are not allowed to delete a site that you are not the admin.
- However, you are still able to restore the site.
- You are able to run existing workflows, and you will get an error: “Something went wrong. To try again, reload the page and then start the workflow”
I am not sure if this is a SharePoint Online issue , or there is any trick or workaround to delete site collection using same method.
Note: I don't want to use SharePoint Apps
I have implemented my code based on MSDN official documentation