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?
Steps to reproduce
Assuming you have permissions to set tenant properties.
- Enable Custom scripts block on your site/app catalog site (technically this should now be automatically enforced)
- 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"
});
- 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
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?
Steps to reproduce
Assuming you have permissions to set tenant properties.
{ "error": { "code": "-2147024891, System.UnauthorizedAccessException", "message": "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" } }Expected behavior
Tenant property is set