-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oAuthPrompt has an invalid value/link on Bot Emulator v4.5.2 #1756
Comments
Hi @textminer , Thanks for the detailed issue report! From the looks of your screenshots it appears that the Emulator has fallen back to providing you with an emulated token and not a genuine token from the Bot Framework token service. This happens when the Emulator fails to generate a valid OAuth signin link. This can be caused by several things, but usually is due to an incorrect path to ngrok in the settings page, but it looks like you have that configured. I currently have a pull request (#1745) out that will add error logging to this flow, so the Emulator will tell you why it is falling back to generating an emulated token. Once this PR gets merged in (hopefully by the end of day), we will release a new nightly version of the Emulator tonight with the change. It would be great if you could use that nightly version (will be available here once it has been released) and try this same scenario so we can see the error message that is causing this. Also, I believe you need to have the correct Microsoft App ID & Password passed into your bot code as well as into the Emulator when connecting to your bot. |
Hi @tonyanziano, I made sure the Microsoft App ID & Password are correct doing a POST using POSTMAN as explained at https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication?view=azure-bot-service-4.0 Thanks for putting hands on it. I'll let you know the outcomes with the new nightly version. |
@textminer the PR has been merged in, so the nightly should become available shortly after 10 PM PST tonight (Usually around 10:30 PM PST). |
Awesome! Glad you got it figured out. |
Related to:
#1006
microsoft/BotBuilder-Samples#728
Version
v4.5.2
Describe the bug
Invoking OAuthCards on Bot Emulator results in InvalidAuthenticationToken, with CompactToken parsing failed with error code: 80049217.
OAuthCard Connection String has been tested on Azure and results ok.
To Reproduce
InvalidAuthenticationToken, with CompactToken parsing failed with error code: 80049217.
Token received is an authorization token rather than an access token. Also, noticed that the link created on the emulator does not look correct as seen at:
oAuthPrompt has an invalid value/link #1006
Source Code being used
// Create a DialogSet that contains the OAuthPrompt.
this.dialogSet = new DialogSet(this.dialogState);
...
await step.context.sendActivity(
Your token is: ${ tokenResponse.token }
);Expected behavior
A valid access token should be received for querying the MS Graph API.
Screenshots
Bot Emulator settings
Additional context
Same source code works fine in MS Teams. It returns a valid Bearer Token.
My only suspicion is that I do not put MsAppPassword in .ENV
[bug]
The text was updated successfully, but these errors were encountered: