Jun 02 2023 02:33 AM
Jun 02 2023 02:33 AM
Where do you go to find information about managing old and inactive SharePoint sites? Like, a *lot* of sites, such that automation is required. My fantasy is that a Power Automate workflow could be built to crawl through each active site and look at the last active date, ping the owner if that date is far in the past, switch the site to read-only if there's no response, and then delete it if nobody screams about that, but before I attempt going down that road - if it's even possible - I wanted to ask how other folks manage large amounts of inactive sites? As far as I can tell, the SP policies aren't useful in this case.
Bonus question: we have sites with last active dates going back to 2016, but then a whole bunch which don't have a last active date at all - what's going on there?
Jun 03 2023 01:50 PM
Quick reply, I can go much more in detail if needed, I can talk governance for weeks
So your not far off how you should build a native Governance engine within Microsoft 365/SharePoint.
First off, what you need to do:
You need to script or use Power Automate to get all inactive sites, ownerless sites and groups that are not been used for atleast a year. You can use the graph connector or HTTP connector for this and register an app to get all permissions needed
Inventory these to a SharePoint list and ask the owners or the members if the sites still needs to live and the content? If no delete the site or archive it. If yes, keep it but they need to be owners, You need atleast two owners for all sites.
Send out an email with a couple of options and let the user decide, Keep, Archive or Delete. These will be tagged in the response.
Sites that need be archived you have two ways. Save everything to a library for each site OR Use Syntex and they archiving solution, it's alot cheaper storage and you can save the whole site. I prefer the Syntex one but it's not out yet.
Also make use of sensitivity labels and retention policies to know what kind of data we have, It's A to Ö as we say in Sweden
When you're done:
So in Azure you have the option for expiration policy, this will notify the owner if the site/ has been inactive for a year if it going to be deleted. You can use the Graph API to trigger from this and archive the content of the site. For this you can use a flow that checks everyday and then decide what to do.
Jun 04 2023 09:59 PM - edited Jun 04 2023 11:02 PM
@NicolasKheirallah thanks - this is a really helpful response. I tried building a Power Automate as you suggested, but the example I followed only includes the Title and SiteUrl properties - I wonder where I locate the correct terms for e.g. Last Activity. Also, I noticed that when I ran a test, only about 10% of our total sites were returned (and - incidentally - multiple line items per site): is this perhaps related to what you mean by "register an app to get all permissions needed"?
Jun 05 2023 03:56 PMSolution
Jun 05 2023 11:13 PM - edited Jun 05 2023 11:55 PM
@NicolasKheirallah thanks again. I appreciate these answers, but unfortunately they're a little above my skill level. As an alternative, I exported a complete list of sites from https://admin.microsoft.com/Adminportal/Home?#/reportsUsage/SharePointSiteUsageV1 and imported that into a SharePoint list, for which I can build a Power Automate workflow to send owner notifications.
I'll have to give this some more thought though - and the deletion stage too (I'm not even sure if my "set site to read only" idea can be done) - because there are several thousand sites going back 8 years, which means there's all sorts of considerations around e.g. sites without owners and managing different site types, and there isn't much documentation around using the Send an HTTP request in SharePoint action to delete sites either. Thanks again for your help.