OAuth URL support in Azure AI Bot Service
Azure AI Bot Service provides different OAuth and OAuth redirect URLs to meet specific needs.
- The bot needs the OAuth URL at run time.
- You need to provide the OAuth redirect URL when you create or configure your OAuth identity provider.
- For more information, see how to add authentication to your bot.
Choose the URLs to use with your bot and identity provider based on your data residency requirements and whether your bot is in the public cloud or the Microsoft Azure Government cloud or the Microsoft Azure operated by 21Vianet.
Data residency | Cloud | OAuth URL | OAuth Redirect URL |
---|---|---|---|
None | Public | https://token.botframework.com |
https://token.botframework.com/.auth/web/redirect |
None | Azure operated by 21Vianet | https://token.botframework.azure.cn |
https://token.botframework.azure.cn/.auth/web/redirect |
The default OAuth and OAuth redirect URLs are https://token.botframework.com
and https://token.botframework.com/.auth/web/redirect
, which can be used for public-cloud bots with no data residency requirements.
To configure OAuthUrl in bot
Update appsettings.json to include OAuthUrl options:
{
"MicrosoftAppType": "",
"MicrosoftAppId": "",
"MicrosoftAppPassword": "",
"BotOpenIdMetadata": "https://login.botframework.azure.cn/v1/.well-known/openidconfiguration",
"CallerId": "urn:botframework:azure",
"OAuthUrl": "https://europe.token.botframework.azure.cn/",
"ToBotFromChannelOpenIdMetadataUrl": "https://login.botframework.azure.cn/v1/.well-known/openidconfiguration",
"ToBotFromChannelTokenIssuer": "https://api.botframework.azure.cn",
"ToBotFromEmulatorOpenIdMetadataUrl": "https://login.partner.microsoftonline.cn/botframework.com/v2.0/.well-known/openid-configuration",
"ToChannelFromBotLoginUrl": "https://login.partner.microsoftonline.cn/{0}",
"ToChannelFromBotOAuthScope": "https://api.botframework.azure.cn",
"ValidateAuthority": true
}
Additional information
Some environments use endpoints different than the ones listed here.
See these articles for related information.