SOLVED

Set versioning limits at tenant limit

Brass Contributor

Is it possible to set tenant level for file versioning. So that by default the limit for minor and major versions are set to say 250. Currently the default seems to be 500. If it is, how is this done?

9 Replies
best response confirmed by Eddoria (Brass Contributor)
Solution

@Eddoria I don't think there is any direct setting available for this at tenant level as this settings are available at library level.

 

You might need to use PowerShell or any other automation which will read all libraries in tenant and update versioning settings programmatically.

 

References:

  1. SharePoint Online: How to Enable Versioning on a Document Library using PowerShell? 
  2. SharePoint Online: Set Versioning Limit using PowerShell   

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Hi, Yes there is! I was looking this up myself. The command set-spotenant -MajorVersionLimit will do it.
You can check your tenant's current setting by running:
Get-SPOTenant | Select-Object majorversionlimit
https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-...
Does anyone know if this the majorversionlimit setting is changed, will it affect all existing SharePoint sites? I ask because this is a good way to free up SharePoint storage if it works.
So I tested this in my test tenant. Say it's in private preview. Bummer!

S C:\> Set-SPOTenant -MajorVersionLimit 10
Set-SPOTenant : The requested operation is part of a feature that is in private preview and will be available when the feature becomes generally available (GA).
At line:1 char:1
+ Set-SPOTenant -MajorVersionLimit 10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-SPOTenant], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SetTenant

@Earl Zirkle This is a new feature Microsoft adding to SharePoint to allow manual mode for SharePoint versioning settings and limits. It is still in preview phase and expected to be available globally (GA) around March 2024.

 

You can find more details at: https://www.microsoft.com/en-us/microsoft-365/roadmap?filters=SharePoint&searchterms=145802 

ganeshsanap_0-1691044308300.png


Please consider giving a Like if my post helped you in any way.

@ganeshsanap I get that a new feature needs to be previewed... but what is the current best practice to limit versions below 100? We got major problems with afdesign-files taking huge amount of space.

@andrelung 

 

You will have to set versioning limits at individual SharePoint document library level. Either you can set the versioning limit manually (if you are using less number of libraries for storing such files) or use PowerShell for setting versioning limit to all document libraries in a SharePoint site.

 

Check: SharePoint Online: Set Versioning Limit using PowerShell 


Please consider giving a Like if my post helped you in any way.

@ganeshsanap currently version limits are ignored if you have retention labels applied. So while the library may have 500 major versions limit, that number is ignored and will continue to grow till it hits 50,000 versions.  

When users co-edit together they can easily create 20-30 versions in a single day.

This is a big issues as we only want to retain the latest version of our files for retention.   Or at worse the latest version and the last 499 changes. Not up to 50,000.  Do you know if this new feature will work with retention labels? As in honour the library or tenant limit while a retention label has been applied?

@andrelung 
I wolud suggest to check this tool.
https://dms-shuttle.com/documentation/update-versioning-limits-in-sharepoint-online-onedrive/

It provides some bulk operations like "Bulk delete Versions" and "Bulk update Versioning Settings". It allows you to set the versioning limits in bulk for all libraries in a sites or entire tenant. And you can select version limis below 100.

1 best response

Accepted Solutions
best response confirmed by Eddoria (Brass Contributor)
Solution

@Eddoria I don't think there is any direct setting available for this at tenant level as this settings are available at library level.

 

You might need to use PowerShell or any other automation which will read all libraries in tenant and update versioning settings programmatically.

 

References:

  1. SharePoint Online: How to Enable Versioning on a Document Library using PowerShell? 
  2. SharePoint Online: Set Versioning Limit using PowerShell   

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

View solution in original post