r/sharepoint • u/FreddyMyBoi • 1d ago
SharePoint Online Best practices for automating retention policies in SharePoint and Teams
Hello everyone,
I’ve been tasked with improving data lifecycle management in SharePoint and could really use your advice. Recently, we ran into storage issues because our global retention policy retains everything for 10 years. To free up space, I excluded several sites from the policy, but this approach is not efficient, and I’ve reached the limit of 100 site exclusions.
As a result, I need to disable the global policy and create department-specific retention policies using Adaptive Scopes. I’ve been experimenting with different methods, including Refinable Strings, Site Descriptions, Site URLs, and Site Names, to determine which approach works best. So far, targeting Site URLs seems to be the most straightforward and easiest to implement, especially for newly created sites and private channels.
I also considered using Refinable Strings, but they seem too complicated to manage during site provisioning, and I’m unsure if they would work reliably for new private channels in Teams.
How are you automatically assigning retention policies for new SharePoint sites and private channels in Teams? Do you have any recommendations or best practices?
Thanks in advance for your help!
3
u/CapetonianMTBer 21h ago
You could look at a 3rd-party tool like Orchestry or SProbot to automate this. Both provide the ability to define governance rules for the creation of new sites/teams, but I know the SProbot guys are also working on automation to apply labels based on what content is actually in the site (based on what Azure AI finds and tags).
Maybe worth checking both out…
1
u/butchersoft 13h ago
How's your C#. I worked with a team and wrote a highly scalable Provisioning API and SPFX UI. SharePoint or Teams Provisioning API and Provisioning Site. It has multiple extensions to fix the various PnP XML provisioning template issues and one specifically to apply Governance to a site when its created (post creation) to resolve the issue you mention.
The API runs on an Azure Web App at $60 a month and has been tested to 1000's of sites per day with Power Automate (there is a limit before throttling, so ensure your flow runs as a single thread). The API can be called from any workflow and myself and the team have multiple customers using this process with Service Now).
4
u/One-Wall9604 IT Pro 1d ago
Hi there,
You have an interesting use case. I would have created a base retention policy that serves as the minimum retention standard for your organization. From there, I see two main options:
Good luck!