Trying to take my Sunday a bit easy but why not just put in a bit effort to make others lives a bit easier?! If you need to see some JSOM in action for reading property bag values, or just want to see what those darn values are heres a quick script to run in your browser developer console. Outputs all property bag values from the current SharePoint web. Keep in mind that properties are web-scoped.

function ListAllProperties()
    var ctx = new SP.ClientContext.get_current();
    var web = ctx.get_web()
    this.propertyBag =  web.get_allProperties();
    ctx.executeQueryAsync(Function.createDelegate(this, propertiesLoaded), null);

function propertiesLoaded() 
    var myPropBag = this.propertyBag;
    var myPropValues = propertyBag.get_fieldValues();	

	for (var key in myPropValues){
				console.log(key + ": " + myPropValues[key])


function pbKeys(obj)
    var keys = [];
    for(var key in obj)
        if(obj.hasOwnProperty(key) && !key.startsWith("__"))

    return keys.sort();


Stay frosty SP devs.

No Comments

There are no comments related to this article.

Leave a Reply

Your email address will not be published. Required fields are marked *