OfficeDev / teams-toolkit

Developer tools for building Teams apps
Other
440 stars 173 forks source link

Multitenant setup with delegate for configuration #2272

Open Myles2k opened 2 years ago

Myles2k commented 2 years ago

We're trying to have a unique config for each tenant and we would like to build the config via delegate in startup. Somewhat like it has been done in BlazoradeTeams (https://github.com/Blazorade/Blazorade-Teams/blob/master/Samples/TeamsTabAppServer/Startup.cs):

services.AddBlazoradeTeams()
        .WithOptions((p, c) =>
        {
            var mySettings = EngineContext.Current.Resolve(MySettings); //this just gets and provides the settings
            c.ClientId = mySettings.ClientId;
            c.ClientSecret = mySettings.ClientSecret;                        
            c.IdentifierUri= "api://xxx/xxx";
            //etc.
         });

Is there a way to do this or any workaround to this?

ghost commented 2 years ago

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

therealjohn commented 2 years ago

@Myles2k Thanks for raising this. We don't support this right now. I can imagine how it would be useful! Can you share any more detail into the setup you want to achieve and how it helps?

I'll use that info to document this feature in our backlog.

Myles2k commented 2 years ago

We're using Finbuckle multitenant (host strategy) in .NET5 so we can have a unique Area for each tenant (customer)... and since we have more than one tenant we need unique configurations for each one too.