Forum Discussion

Paweł Patalong's avatar
Paweł Patalong
Copper Contributor
Feb 08, 2017
Solved

CSOM - Web Property Bag on Root Tenant site issue

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.

  • Dhirendra Yadav's avatar
    Dhirendra Yadav
    Mar 16, 2017

    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.

    https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f

6 Replies

  • Paweł Patalong's avatar
    Paweł Patalong
    Copper Contributor

    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.

    • Dhirendra Yadav's avatar
      Dhirendra Yadav
      Copper Contributor

      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.

      https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f

      • Paweł Patalong's avatar
        Paweł Patalong
        Copper Contributor
        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!
  • Anonymous's avatar
    Anonymous

    have not run into this issue yet

Resources