
Hi @Aniruddha Aditya ,
We could access the custom property bag key-value with the rest api /_api/web/allProperties
.
So as a READER, you could fetch Key-Value pair from site property bag in SPFX. Below is my demo code snippet:
import { SPHttpClient, SPHttpClientConfiguration, SPHttpClientResponse, ODataVersion, ISPHttpClientConfiguration } from '@microsoft/sp-http';
const spHttpClient: SPHttpClient = this.context.spHttpClient;
const currentWebUrl: string = this.context.pageContext.web.absoluteUrl;
//GET current web info
spHttpClient.get(`${currentWebUrl}/_api/web/allProperties`, SPHttpClient.configurations.v1).then((response: SPHttpClientResponse) => {
response.json().then((PropertyValues: any) => {
console.log(PropertyValues);
});
});
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.