Any way to figure out whether a site was created via Self-Service Site Creation or “regularly”?
-
10-12-2019 - |
Question
Is there any way to figure out whether a site was created by a user, using self-service site creation or by an admin by Central Administration or PowerShell?
I tried looking through the SPWeb.AllProperties
for some identifier or SPSite.GetSelfServiceSiteCreationSettings
, but that only contained whether self-service was enabled for the site, not whether the site was created using it. The only workaround I found so far: SPSite.RootWeb.Author
which hopefully is different for self-service created site.
Besides using a custom provisioning provider which would write a custom property into the root web - any standard way to figure out how the site was created?
Solution
SharePoint doesn't store the method used to create a site anywhere. Your only indicator would be to identify sites whose author doesn't actually have the appropriate permissions to create sites. As far as a custom provisioning provider, the SPWebProvisioningProperties object passed to the provider doesn't offer any information as to the method either.