79754482

Date: 2025-09-03 10:56:21
Score: 0.5
Natty:
Report link

To resolve token exchange issues in a Microsoft Teams bot, first ensure you're using an adapter that supports OAuthPrompt.recognizeToken(), such as TeamsActivityHandler, which is designed to handle Invoke activities. Since Teams sends an Invoke activity instead of an Event for OAuth, you must forward this to the dialog stack by properly handling onInvokeActivity and calling run() on the dialog context. Additionally, verify that your app manifest includes all required valid domains, such as token.botframework.com, graph.microsoft.com, and your tunneling domain if applicable.

Lastly, confirm that your app registration is correctly configured with appropriate API permissions, the exact OAuth connection name in both Azure and your environment file, and a matching App ID in the webApplicationInfo resource field.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Sayali-MSFT