Language

BotConfig Class

Definition

Configuration model for bot authentication credentials, sourced from a Microsoft.Identity.Web compatible configuration section (e.g. "AzureAd").

public sealed class BotConfig
type BotConfig = class
Public NotInheritable Class BotConfig
Inheritance
BotConfig

Constructors

Name Description
BotConfig()

Properties

Name Description
BotTokenIssuer

Gets or sets the expected Bot Framework token issuer used to validate inbound Bot Framework tokens. For sovereign clouds, set BotFramework:BotTokenIssuer in configuration, e.g. "https://api.botframework.us" for USGov. Defaults to the public-cloud issuer when not configured.

ClientId

Gets or sets the application (client) ID from Azure AD app registration.

DangerouslyAllowUnauthenticatedRequests

Gets or sets whether inbound bot requests should bypass authentication. This should only be enabled for local development.

EntraInstance

Gets or sets the Entra login instance used when validating Entra-issued tokens. For sovereign clouds, set {SectionName}:Instance in configuration (the standard Microsoft.Identity.Web key), e.g. "https://login.microsoftonline.us/" for USGov. Defaults to the public-cloud instance when not configured.

GraphBaseUrl

Gets or sets the Microsoft Graph host root that Graph-backed features address. For sovereign clouds, set BotFramework:GraphBaseUrl in configuration, e.g. "https://graph.microsoft.us" for USGov. Defaults to the public-cloud host when not configured.

A host root, not a versioned endpoint: callers append their own API version, so a pre-versioned value produces /v1.0/v1.0.

OpenIdMetadataUrl

Gets or sets the Bot Framework OpenID metadata URL used to fetch signing keys for validating inbound Bot Framework tokens. For sovereign clouds, set BotFramework:OpenIdMetadataUrl in configuration, e.g. "https://login.botframework.azure.us/v1/.well-known/openid-configuration" for USGov. Defaults to the public-cloud endpoint when not configured.

SectionName

Gets or sets the configuration section name used to resolve this BotConfig. Also used as the MSAL named-options key and the JWT auth scheme name.

TenantId

Gets or sets the Azure AD tenant ID.

Methods

Name Description
Resolve(IServiceCollection, String)

Resolves a BotConfig from a service collection by extracting configuration and logger.

Applies to