microsoft / BotFramework-Emulator

A desktop application that allows users to locally test and debug chat bots built with the Bot Framework SDK.
https://aka.ms/botemulator
MIT License
1.79k stars 748 forks source link

OAuth Prompt not working in Emulator #2435

Closed abdulraouf9567 closed 10 months ago

abdulraouf9567 commented 1 year ago

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

4.14.1

Describe the bug

I have created a bot using bot framework composer (v2.1.2) where I have used the OAuth prompt to generate token from the Azure AD. When I tested this in Emulator(4.14.1) once I clicked the OAuth button it shows the redirect url(https://token.botframework.com/.auth/web/redirect) which is shown below and when I clicked the confirm a sign in window pop up with nothing and goes off and no token is generated. I am able to get the token in the web chat as well as in the teams. Please see the below screenshot.

To Reproduce

Steps to reproduce the behavior:

  1. Create a bot using bot framework composer using OAuth Prompt action
  2. Add the app id and password in the composer project
  3. Add Oauth configuration in Azure Bot channel, Provide the connection Name, client id , scope etc
  4. Run the bot in emulator click login for the OAuth prompt action

Expected behavior

When clicked on Login, it should pop a window to signin the user and it will generate the token.

Screenshots

Login 1 Confirm-2 Sign in window

Additional context

Bot composer version 2.1.2, NET 7.0

[bug]

InfinytRam commented 12 months ago

Thanks @abdulraouf9567, I'm investigating.

OEvgeny commented 12 months ago

This looks like related to #2428

abdulraouf9567 commented 12 months ago

Hi @OEvgeny , I have tried with the latest version available, it is still the same error.

InfinytRam commented 11 months ago

Hi @abdulraouf9567,

I was not able to reproduce this issue using Bot Framework Emulator version 4.14.1 and ngrok version 2.3.41.

The token was successfully retrieved using Composer's OAuth login prompt: image

Composer OAuth Prompt dialog: image

InfinytRam commented 11 months ago

@abdulraouf9567,

Could you please make sure in Emulator settings the following options are checked:

image

Configure the Emulator for authentication

abdulraouf9567 commented 11 months ago

Hi @ramfattah ,

I tried the above steps

Screenshot 2023-07-13 022854

Screenshot 2023-07-13 023105

After I have copied the code and pasted in the chat it is showing like this:

Screenshot 2023-07-13 023126

As you can see in the trace window, the bot is calling the regex intent.

FYI: I am calling the CLU endpoint (HTTP Post in the trace window). (https://techcommunity.microsoft.com/t5/fasttrack-for-azure/moving-from-luis-to-clu-in-bot-composer-projects/ba-p/3635914)

I used the above link to integrate CLU in the Bot framework Composer.

InfinytRam commented 11 months ago

@abdulraouf9567, are you able to provide a minimal reproducible .zip bot sample?

InfinytRam commented 11 months ago

Hi @abdulraouf9567, I was not able to reproduce this issue.

From my end, I installed the Microsoft's ConversationLanguageUnderstanding recognizer package in my Composer bot, rather than manually making HTTP request as shown doc link above.

InfinytRam commented 11 months ago

Closing due to inactivity. @abdulraouf9567, please re-open if needed. Thanks.