AddBotApplicationExtensions.EnsureMsalServices Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers the shared MSAL token-acquisition pipeline and binds the named MSAL options.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection EnsureMsalServices(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Teams.Core.Hosting.BotConfig botConfig);
static member EnsureMsalServices : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Teams.Core.Hosting.BotConfig -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function EnsureMsalServices (services As IServiceCollection, botConfig As BotConfig) As IServiceCollection
Parameters
- services
- IServiceCollection
- botConfig
- BotConfig
Returns
Remarks
Safe to call multiple times: the Microsoft.Identity.Web service registrations are TryAdd-based, and the named options binding (MicrosoftIdentityApplicationOptions and ManagedIdentityOptions) appends an additional configure delegate per call. Those delegates are idempotent against the same BotConfig, so re-running them produces the same options state.