SharePoint / SharePoint/sp-dev-docs

Can't set tenant properties anymore

Open
#10,705 6 comments 2 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Mar 9, 2026.

sharepoint-developer-support type:bug-confirmed
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint REST API

Describe the bug / error

Blocked Custom scripts blocking us from setting Tenant Properties. We're using Tenant Properties as global settings for our apps, e.g. to disable telemetry.

I wonder if that's intended?

Image
Steps to reproduce

Assuming you have permissions to set tenant properties.

  1. Enable Custom scripts block on your site/app catalog site (technically this should now be automatically enforced)
  2. Try to set tenant properties, e.g.
fetch("<appCatalogUrl>/_api/web/SetStorageEntity", {
  "headers": {    
    "content-type": "application/json;charset=utf-8"
  },  
  "body": "{\"key\":\"Test\",\"value\":\"TEST\"description\":\"TEST\",\"comments\":\"TEST\"}",
  "method": "POST"
});
  1. Request fails with status code 403
{
    "error": {
        "code": "-2147024891, System.UnauthorizedAccessException",
        "message": "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
    }
}
Expected behavior

Tenant property is set

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.