SharePoint Content Organiser PropertyBag Property Settings


The SharePoint CSOM API doesn’t have an implementation to change the Content organiser settings for a site, but these settings are persisted on the Webs propertybag, meaning that you can change them using CSOM or REST.

The Content Organiser Settings
co-settings

Setting PropertyBag Property
Require users to use the organizer when submitting new content to libraries with one or more organizer rules pointing to them client_x005f_routerenforcerouting
Allow rules to specify another site as a target location OData__x005f_routerenablecrosssiterouting
Create subfolders after a target location has too many items OData__x005f_routerautofoldersettings

<AutoFolder>
   <Properties>
      <Property Name="AutoFolderPropertyFormat" Value="Submitted after %1" />
      <Property Name="MaxFolderItems" Value="2500" />
      <Property Name="AutoFolderEnabled" Value="True" />
   </Properties>
</AutoFolder>
Use SharePoint versioning OData__x005f_routerversioning: UseSharePointVersioning
Append unique characters to the end of duplicate filenames OData__x005f_routerversioning: AppendUniqueSuffixes
Save the original audit log and properties of submitted content OData__x005f_routersaveauditlogs
E-mail rule managers when submissions do not match a rule OData__x005f_routeremailforproblems
E-mail rule managers when content has been left in the Drop Off Library OData__x005f_routeremailforstalecontent
Manager OData__x005f_routermanageremail: i:0#.f|membership|phil.harding@platinumdogsconsulting.onmicrosoft.com
Number of days to wait before sending an e-mail OData__x005f_routerstalecontentthreshold

co-settings-01

Published by

Phil Harding

SharePoint Consultant, Developer, Father, Husband and Climber.

One thought on “SharePoint Content Organiser PropertyBag Property Settings

  1. Phil!

    To set this using PnP PowerShell, you need to change the PB names.

    Set-PnPPropertyBagValue -Key “client_routerenforcerouting” -Value “True”
    Set-PnPPropertyBagValue -Key “_routerversioning” -Value “UseSharePointVersioning”
    Set-PnPPropertyBagValue -Key “_routeremailforproblems” -Value “True”
    Set-PnPPropertyBagValue -Key “_routeremailforstalecontent” -Value “True”
    Set-PnPPropertyBagValue -Key “_routermanageremail” -Value “i:0#.f|membership|david@dmdavies365.onmicrosoft.com”

    This was a life saver though, I didn’t think it was possible at all.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.