Azure AI Bot Service 中的 OAuth URL 支援

Azure AI Bot Service 提供不同的 OAuth 和 OAuth 重新導向 URL,以符合特定需求。

  • Bot 在運行時間需要 OAuth URL。
  • 當您建立或設定 OAuth 識別提供者時,您需要提供 OAuth 重新導向 URL。
  • 如需詳細資訊,請參閱 如何將驗證新增至您是 Bot

根據您的數據落地需求,以及您的 Bot 位於公用雲端或 Microsoft Azure Government 雲端,選擇要與您的 Bot 和身分識別提供者搭配使用的 URL。

資料落地 雲端 OAuth URL OAuth 重新導向 URL
公開 https://token.botframework.com https://token.botframework.com/.auth/web/redirect
歐洲 公開 https://europe.token.botframework.com https://europe.token.botframework.com/.auth/web/redirect
美國 公開 https://unitedstates.token.botframework.com https://unitedstates.token.botframework.com/.auth/web/redirect
印度 公開 https://india.token.botframework.com https://india.token.botframework.com/.auth/web/redirect
Azure Government https://token.botframework.azure.us https://token.botframework.azure.us/.auth/web/redirect

默認的 OAuth 和 OAuth 重新導向 URL 是 https://token.botframework.comhttps://token.botframework.com/.auth/web/redirect,可用於沒有數據落地需求的公用雲端 Bot。

在 Bot 中設定 OAuthUrl

更新 appsettings.json 以包含 OAuthUrl 選項:

{
  "MicrosoftAppType": "",
  "MicrosoftAppId": "",
  "MicrosoftAppPassword": "",

  "BotOpenIdMetadata": "https://login.botframework.com/v1/.well-known/openidconfiguration",
  "CallerId": "urn:botframework:azure",
  "OAuthUrl": "https://europe.token.botframework.com/",
  "ToBotFromChannelOpenIdMetadataUrl": "https://login.botframework.com/v1/.well-known/openidconfiguration",
  "ToBotFromChannelTokenIssuer": "https://api.botframework.com",
  "ToBotFromEmulatorOpenIdMetadataUrl": "https://login.microsoftonline.com/botframework.com/v2.0/.well-known/openid-configuration",
  "ToChannelFromBotLoginUrl": "https://login.microsoftonline.com/{0}",
  "ToChannelFromBotOAuthScope": "https://api.botframework.com",
  "ValidateAuthority": true
}

其他資訊

某些環境會使用不同於此處所列端點的端點。

如需相關信息,請參閱這些文章。