Language

AddBotApplicationExtensions Class

Definition

Provides extension methods for registering bot application clients and related authentication services with the dependency injection container.

public static class AddBotApplicationExtensions
type AddBotApplicationExtensions = class
Public Module AddBotApplicationExtensions
Inheritance
AddBotApplicationExtensions

Remarks

This class is intended to be used during application startup to configure HTTP clients, token acquisition, and agent identity services required for bot-to-bot communication. The configuration section specified by the Azure Active Directory (AAD) configuration name is used to bind authentication options. Typically, these methods are called in the application's service configuration pipeline.

Methods

Name Description
AddBotApplication(IServiceCollection, String)

Registers the default bot application and its dependencies in the service collection.

AddBotApplication<TApp>(IServiceCollection, BotConfig)

Registers a custom bot application and its dependencies in the service collection.

AddBotApplication<TApp>(IServiceCollection, String)

Registers a custom bot application and its dependencies in the service collection.

AddBotClient<TClient>(IServiceCollection, String, BotConfig)

Registers a typed HttpClient for TClient wired to bot authentication using an already-resolved BotConfig.

AddBotHttpClient(IServiceCollection, String, BotConfig)

Registers a named HttpClient wired to bot authentication using an already-resolved BotConfig, without binding it to a typed client. Use this when the client type will be registered separately via a factory.

AddConversationClient(IServiceCollection, String)

Registers the ConversationClient and its dependencies in the service collection.

AddUserTokenClient(IServiceCollection, String)

Registers the UserTokenClient and its dependencies in the service collection.

EnsureMsalServices(IServiceCollection, BotConfig)

Registers the shared MSAL token-acquisition pipeline and binds the named MSAL options.

UseBotApplication(IEndpointRouteBuilder, String)

Configures the default BotApplication to handle bot messages at the specified route.

UseBotApplication<TApp>(IEndpointRouteBuilder, String)

Configures the application to handle bot messages at the specified route and returns the registered bot application instance.

Applies to