SOLVED

CSOM - Web Property Bag on Root Tenant site issue

Copper Contributor

Hey!

 

Just a post to inform that there is a bug (or maybe a feature?) where you cannot modify property bag values on root tenant site. For example:

https://company.sharepoint.com

 

Even as a global administrator you will receive 'access denied' message when trying to do so. JSOM, CSOM, nothing actually works.

 

Hope this will be resolved in some future; right now you have to fallback and use normal list to store sensitive data.

6 Replies

have not run into this issue yet

Weird. I haven't had that issue. However, I've read that with Modern team sites, you cannot Access or Update property bags:
https://msdn.microsoft.com/en-us/pnp_articles/modern-experience-customizations-customize-sites
Not sure if it can be related somehow.

Have you tried SP DEV tools extension for Chrome? 

 

https://chrome.google.com/webstore/detail/chrome-sp-dev-tools/efhiadiopfkjpdihdmlccoffnpdblkho 

 

I do nopt have any modern sites in my prod tenant to try this one, but the tools lets you get to the web property bag and edit them if you have permissions. 

 

worth a shot. 

Thanks guys for answers. Actually I have tried it on two different tenants, and received the same results.
Basically, when running my JSOM & CSOM scripts on
>> https://sometenant.sharepoint.com/
It ends with error.
However on
>> https://sometenant.sharepoint.com/sharepoint/sites/some_site_collection
The script inserts property bag without any issues. Note that my account have global admin & site collection administrator rights (in both cases).

For a proof, see image:
http://i.imgur.com/6C1hU5N.png

Anyway, I have contacted Microsoft support through the o365 admin panel, hope this is correct way to request a ticket.

best response confirmed by Paweł Patalong (Copper Contributor)
Solution

This behaviour is because the "The Root Site Collection of the Tenant" have scripting capabilities disabled (it's a so-called NoScript site).

 

If you need to be able to update the property bag for the web then you can enable the same on the site.

 

Refer to the following Microsoft support article for details on enabling this functionality for the Root Site Collection of the Tenant.

Turn scripting capabilities on or off

Thanks, I have actually resolved the issue, but forgot to reply. In fact, you are 100% right. I found this out myself when I run into strange issues with image rendition. It turns out that those things are connected, so if you are reading this because of image rendition issues - ENABLE scripting capabilities!
1 best response

Accepted Solutions
best response confirmed by Paweł Patalong (Copper Contributor)
Solution

This behaviour is because the "The Root Site Collection of the Tenant" have scripting capabilities disabled (it's a so-called NoScript site).

 

If you need to be able to update the property bag for the web then you can enable the same on the site.

 

Refer to the following Microsoft support article for details on enabling this functionality for the Root Site Collection of the Tenant.

Turn scripting capabilities on or off

View solution in original post