2

I'm using the PnP extension ApplyProvisioningTemplate to apply an XML site template as part of our provisioning process, a C# API running in Azure. One of the ClientSideWebPart we use is News. I have exported the template from our development tenant and we will now move the solution to test, pre-prod and prod.

The problem is how I make sure the proper news source is referenced when I move between tenant. I have written code to update the Url reference in the News web part JSON and I will surely also be able to update the WebId and SiteId. The template is stored as a resource in the C# solution.

However, I don't know how to get the IndexId and ExchangeId properties. ExchangeId seems to be a Base64 of SiteId + WebId + 0-guid + something more. But unclear if the "something more" is the same for all connections or not. And IndexId I have not idea about how to get.

Part of the JSON used to configure the News web part.

"sites": [
{
    "Acronym": "RM",
    "Title": "lorem ipsum",
    "BannerColor": "#0078d4",
    "BannerImageUrl": "",
    "Url": "{hosturl}/sites/appsdev",
    "Type": "Site",
    "ItemReference": {
    "WebId": "bc0e2591-c240-4458-a732-62794fe362f7",
    "IndexId": 17599972766451,
    "ExchangeId": "SPO_ZmNkNzNmODUtODM0My00MDMxLTk1ZTAtNDcxN2U5NmY0Mzg2LGJjMGUyNTkxLWMyNDAtNDQ1OC1hNzMyLTYyNzk0ZmUzNjJmNywwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDA_01GWCMPMIAAAAAAAAAAAAAAAAAAAAAAAAA",
    "Source": "Users",
    "SiteId": "fcd73f85-8343-4031-95e0-4717e96f4386",
    "Type": "SiteReference"
}
]
1
  • Did you ever find how to get the IndexId and ExchangeId properties?
    – user232
    May 19 at 15:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy