Prise en charge des URL OAuth dans Azure AI Bot Service

Azure AI Bot Service fournit différentes URL de redirection OAuth et OAuth pour répondre à des besoins spécifiques.

  • Le bot a besoin de l’URL OAuth au moment de l’exécution.
  • Vous devez fournir l’URL de redirection OAuth lorsque vous créez ou configurez votre fournisseur d’identité OAuth.
  • Pour plus d’informations, consultez comment ajouter l’authentification à votre bot.

Choisissez les URL à utiliser avec votre bot et votre fournisseur d’identité en fonction de vos exigences de résidence des données et indiquez si votre bot se trouve dans le cloud public ou dans le cloud Microsoft Azure Government.

Résidence des données Cloud URL OAuth : URL de redirection OAuth
Aucun Public https://token.botframework.com https://token.botframework.com/.auth/web/redirect
Europe Public https://europe.token.botframework.com https://europe.token.botframework.com/.auth/web/redirect
États-Unis Public https://unitedstates.token.botframework.com https://unitedstates.token.botframework.com/.auth/web/redirect
Inde Public https://india.token.botframework.com https://india.token.botframework.com/.auth/web/redirect
Aucun Azure Government https://token.botframework.azure.us https://token.botframework.azure.us/.auth/web/redirect

Les URL de redirection OAuth et OAuth par défaut sont https://token.botframework.com et https://token.botframework.com/.auth/web/redirect, qui peuvent être utilisées pour les bots cloud public sans exigences de résidence des données.

Pour configurer OAuthUrl dans le bot

Mettez à jour appsettings.json pour inclure les options 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
}

Informations supplémentaires

Certains environnements utilisent des points de terminaison différents de ceux répertoriés ici.

Pour plus d’informations, consultez ces articles.