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

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 |
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.