How to share data for all Web Parts (SPFx) within a SharePoint Online tenant RRS feed

  • Question

  • Hello,
    We are an ISV and developing a SPFx Web Part using the new SharePoint Framework (The same question applies for the Script Editor Web Part too). The Web Part will be added to hundreds of pages across a number of site collections. To make configuration easy for the customer, we’d like to have a central location to store the shared data (for configuration purpose) for all Web Parts within the same tenant.

    So far, we can’t find a good place to store the data. We thought about using the site property bag of the root site of a site collection or a dedicated document library. Although this works within the same site collection (Web Parts can find the root site easily), it doesn’t work when multiple site collections are involved. The customer has to manually edit each Web Part in other site collections to specify where the data host site is located. As an ISV, we can’t hard code the URL to the Web Part package, nor expecting customers to modify the package themselves.

    I want to know if there is a common location at tenant level where all Web Parts can discover automatically without explicitly specifying any URL. An example location at site collection level is the root web, all Web Parts in a site collection can access the same property bag of a site by using “clientContext.get_site().get_rootWeb()”. Another example is the property bag of a web application or a farm for SharePoint on-premise.

    Any suggestions/thoughts will be appreciated.

    Friday, May 19, 2017 4:00 PM