The Property Bag Feature

I remember the Property Bag feature from long ago, namely SharePoint 2013.  I never used it.

Apparently, it’s still around and available for SharePoint Online.  There is no GUI for it so setting or viewing Property Bag key/value pairs is done either programmatically or via PowerShell.

Scripts are disabled by default on SharePoint Online modern sites.  So if you try to set a Property Bag key/value pair in PowerShell you will encounter an error.  To avoid this, you have to first run a PowerShell command to disable NoScript.  (The double negative means you’re therefore enabling scripts on the site.)   Once NoScript is disabled, you’re free to run your PowerShell script.

According to this article, starting in November, 2024 (i.e. now)  Microsoft is providing a new tenant-wide feature that will allow Property Bag scripts to run without first disabling NoScript.  In short, the Property Bag feature gets a pass.

If you’re thinking either “What is the Property Bag feature?” or “Who cares?  I’ll never use it.” then here is a very good article that describes the feature well and provides some very good use cases, such as auto-applying retention labels.

Definitely heed the part where you need to add the -Indexed parameter if you want this key/value pair to be added to Search.

I can see how the Property Bag feature could be quite useful in assigning Metadata values that are leveraged both by Search as well as Sensitivity or Retention labels.  So consider this hidden feature in your SharePoint Online development journey.

You cannot copy content of this page