microsoft / teams-ai

SDK focused on building AI based applications and extensions for Microsoft Teams and other Bot Framework channels
MIT License
392 stars 170 forks source link

[Dev support]: Help with configuring authentication #1927

Open yikwen opened 1 month ago

yikwen commented 1 month ago

Hi I've implemented an Oauth 2 Generic Provider on my bot service resource in Azure and tested the connection successfully. After configuring authentication as per documentation here with auto set to True, clicking on the Sign In button the adaptive card results in error "Something went wrong. Please try again."

image

On mobile, this is what I see after pressing the Sign In button:

image

yikwen commented 4 weeks ago

Testing the bot via web chat on the Azure Portal, the sign in button works - it opens the browser to the application's sign in page, OAuth consent screen, and once done a code is generated. Pasting the code back in the chat doesn't do anything.

image

corinagum commented 3 weeks ago

@yikwen are you using Python for this? Can I close this in favor of the more recent auth bug you filed?

yikwen commented 3 weeks ago

@corinagum yes using Python. You're referring to #1934? Are they the same issue with the same causes, given that the other one is SSO with Entra ID, and this one is a generic OAuth provider?

SubbaReddi commented 3 weeks ago

@yikwen : Can you specify the detailed reproduce steps to create above scenario?

yikwen commented 3 weeks ago

@SubbaReddi

  1. Register an app with the service provider (in my case, https://talenox.github.io/api-doc/#introduction)
  2. Configure bot service with an Oauth2 Generic Provider connection following documentation here image
  3. Added auth options to my app image
  4. And test code to trigger sign in image

That's all.

SubbaReddi commented 2 weeks ago

@yikwen : Issue is not reproducible for me with the above steps. Something went wrong error message is not displaying. Popup window is opening to provide consent and then window closing. But finally leading to the same issue as reported here

yikwen commented 2 weeks ago

@SubbaReddi just curious, what service provider did you register your application with, and what version of the Python SDK were you working with? I was on 1.3.0, and if I could try the same service provider as the one you tested with then we can see if the behaviour's the same.

SubbaReddi commented 1 week ago

@yikwen : I used talenox service provided as you mentioned above. I was using Teams sdk 1.2.2 with this sample: https://github.com/microsoft/teams-ai/tree/main/python/samples/06.auth.oauth.bot

yikwen commented 1 week ago

@yikwen : I used talenox service provided as you mentioned above. I was using Teams sdk 1.2.2 with this sample: https://github.com/microsoft/teams-ai/tree/main/python/samples/06.auth.oauth.bot

@SubbaReddi i was on v1.3.0

SubbaReddi commented 1 week ago

@yikwen : Is it possible to try with above sample with Teams sdk 1.2.2? Currently i have a different blocker to validate with v1.3.0

yikwen commented 1 week ago

@SubbaReddi unfortunately no, I've configured my code with v1.4.0 features and changing to v1.2.2 would require quite a bit of things to change in my code before I can test OAuth.