Property Bag
Store and retrieve custom key-value pairs on a web (site) using
the property bag.
Prerequisites
| Requirement |
Description |
Reference |
| Site Owner role |
Required to set property bag values. Read access to view. |
SharePoint admin roles |
Examples
Quick start
from office365.sharepoint.client_context import ClientContext
ctx = ClientContext("https://contoso.sharepoint.com/sites/team").with_client_certificate(
"contoso.onmicrosoft.com", client_id="client_id", thumbprint="thumbprint", cert_path="./cert.pem"
)
web = ctx.web.get().execute_query()
web.set_property("AllProperties", {"Custom_Config": "value"}).update().execute_query()
API reference