Setting PropertyBag Property without allowing custom scripts

Martin Ewald 0 Reputation points
2024-07-04T12:35:08.1166667+00:00

We are setting Propery Bag values of a Sharepoint Online Web from an Azure Function using the Microsoft.SharePoint.Client (Microsoft.SharePointOnline.CSOM) Library with the SetPropertyBagValue.

For setting a Property Bag value the "Allow Custom script" property must be set to true otherwise a "Access denied" Exception is thrown.

Currently Microsoft is phasing out the "Allow Custom Scripts" setting. This means that by November 2024 the "Allow Custom Script" option will be reset after 24 hours.

I don't want to temporarily set the "Allow Script" property as i suspect that this will lead to timing issues.

Is there a way to still set a property bag value after november in a recommended and stable way?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,147 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,569 questions
0 comments No comments
{count} votes