I have a tenant thats shared with multiple regions from the same company. Lets say region A, B, C. Each one is doing their own customizations but its all on the same tenant. And we are following the best practice of making hubs and then 1 level of sites inside them (no further subsites). And some hubs will be assigned to each region.

Lets say I am developing for region A. How can I best deploy my spfx customizations that could be scoped to region A? If I do tenant wide, then it would be available to other regions which I don't want. Though I could just code it so if its part of a site not based off of A then display a message saying its blocked. If I do that, what's the best way to detect this? Or can I deploy to some sites?

If I don't deploy tenant wide, then that means I have to manually add the app to the site which is time consuming. And then for updating apps, I need to remove apps and re-add them back again, per site which is really painful.

Does anyone know?


1 Answer 1


... for updating apps, I need to remove apps and re-add them back again, per site which is really painful.

I don't think, this is the case. Every time you add a new app package version to the global App catalog, all sites will get the latest updates automatically.

I will assume you are talking about the App customizer customizations. Headers, footers, custom actions, styles, etc.

Option #1: Deploy App globally

  • Create tenant-wide SPFx solution
  • In your SPFx code, in JavaScript/TypeScript, check the current site's naming convention or site's property bag value or something else that can tell you to which organization the site belongs.
  • If condition is not met, do nothing.

Option #2: Require App installation per site

  • Require app installation for every site
  • As part of the site provisioning process, make sure that the app your custom app is installed

For both options #1 and #2, you don't need to worry about upgrading every single app instance every time you upload a new version to the App catalog. This should be handled automatically. JavaScript bundle is stored in a single place anyway, inside the App Catalog site.

  • For option 2 site provisioning process, is there a way I can make a site template (pnp provisioning) and configure to load with my spfx customizations enabled on it, with pre configured web part property values? If done like this, and I update in the app catalogue (with same version number), it will update the apps that came from the pnp provisioning process?
    – omega
    Sep 19, 2020 at 3:25
  • The answer to all of your questions is: yes, absolutely. Since it does not matter how exactly you have installed the app (via PnPProvisioning template or manually), every time you upload a new sppkg file, all of your sites will get a new version. Sep 19, 2020 at 3:29
  • I noticed that some kinds of extensions like listviewcommandset says that if it is not deployed tenant wide, the process to update it is delete from app catalogue, site, site recycle bin, and re-upload with new version number, and re-add to the site, for each site. Is there a streamlined fast way to do this?
    – omega
    Sep 19, 2020 at 3:31
  • I am not sure about listviewcommandset, actually, maybe that's true. But for the footers, headers and script injections it's definitely not the case. Sep 19, 2020 at 3:34
  • 1
    For the listviewcommandset, it actually explicitly states that the process I described must be done if not deployed tenant wide. Or it throws an error. Just trying to see if there is some fast way to then automate it.
    – omega
    Sep 19, 2020 at 3:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.