botbuilder-js: [OAuthPrompt] The call to https://api.botframework.com/api/usertoken/GetToken returns a 500 response
Versions
4.16
Describe the bug
When using the OAuthPrompt Dialog from the SDK, the call to https://api.botframework.com/api/usertoken/GetToken performed by the SDK returns a 500 status error response. According to the code, the SDK awaits either a 200 or 404 status.
To Reproduce
Steps to reproduce the behavior:
I tried to follow this guide in order to add authentication to the bot with my own identity provider:
https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0&tabs=userassigned%2Caadv2%2Ccsharp
- Configure a custom identity provider on Azure
- Configure the bot with the identity provider connection name
- Type anything
- Auth Prompt should appear but nothing happens
- I receive a 500 status code in the response
- The bot console displays the following error:
body: '{\r\n' +
' "error": {\r\n' +
' "code": "ServiceError",\r\n' +
' "message": "Error retrieving token: caeb276526109146868df38d74c9c52a."\r\n' +
' }\r\n' +
'}',
Expected behavior
Auth Prompt should display a sign-in button
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 17
- Comments: 17 (9 by maintainers)
Hi @elacallefactorial, thanks for your patience.
Looks like there may be additional configurations needed for West Europe region.
Could you please provide below additional configuration in
.env
file and try again to see if that fixes this authentication issue:Example:
Let me know if you have any questions. Thanks.