Search code examples
configurationsettingsmanifestsharepoint-online

SharePoint Online Web Parts - Global Properties / Configuration


The use case for my web part is that it connects to my third party service, where organisations will have their own dedicated instance and domain - this needs to be set for that organisation only, but across every web part.

I can't figure out how to allow an administrator to set a preconfigured entry for the manifest when they upload the .sppkg file to their app catalog. Or, how to allow an administrator to set a "global property" for every web part that can't be changed by regular users.

Does anyone have any advice on the above in the modern Sharepoint web part development experience? It seems like a simple task and yet I can't find solid information on it.


Solution

  • The best (only?) way I found, which I ended up using, was to have the admin create a list in Sharepoint containing the data unique to their organisation, and then to use the API to get that list data in the Web Part. A little fiddly, but it works, and once it's set, they can forget it.