AnswerBun.com

How to set up SPFx customizations on a shared tenant?

SharePoint Asked by omega on November 4, 2020

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?

Thanks

One Answer

... 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.

Answered by Denis Molodtsov on November 4, 2020

Add your own answers!

Related Questions

Is there an API or web service for Copy-SPSite?

0  Asked on October 25, 2021 by spdevadmin

     

Calculated Fields and Outputting to Excel

1  Asked on February 28, 2021 by brandon

 

PnP with .NET Core

1  Asked on February 23, 2021 by thomas-segato

   

How can I use MS Web Test to upload files to SharePoint?

2  Asked on February 19, 2021 by user1258

 

Filtering List View by Current User Email

2  Asked on February 18, 2021 by hushhoney

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP