An Azure service that provides an integrated environment for bot development.
Hi info,
Thanks for sharing the details. This looks like a Teams channel authentication or configuration issue, not a problem with your bot code.
If your bot works in Web Chat but not in Teams, it means your endpoint and bot logic are working fine. The issue is happening before the request reaches your bot.
Teams uses stricter validation through Azure Bot Service. Every request must pass identity and token checks before it is forwarded. If validation fails, you will see 401 errors or no incoming requests at all.
Why Teams returns 401 while Web Chat works
Web Chat is more permissive and can work even if there are small gaps in authentication.
Teams strictly validates App ID, tenant, and tokens. Any mismatch causes the request to be rejected before it reaches your bot. [youtube.com]
Why it stopped working suddenly
This usually happens due to small configuration changes such as expired credentials, App registration updates, managed identity changes, or tenant policy updates. Even a small mismatch can break Teams while Web Chat still works.
What to check
Check App ID alignment. Make sure the same App ID is used in Azure Bot, App registration, and Teams manifest.
Example: If your App ID is abc123, it must match exactly in all three places.
Check authentication setup. Make sure your auth type is correct and credentials are valid.
Example: Client secret setup MICROSOFT_APP_ID and MICROSOFT_APP_PASSWORD must match App registration Secret should not be expired.
Managed identity setup. Ensure identity is still assigned and has required permissions.
Check Teams channel. Confirm Teams channel is enabled, and bot is installed with correct scope.
Check endpoint Ensure endpoint is public, HTTPS, and points to /api/messages
Example: https://yourapp.azurewebsites.net/api/messages
Check logs. No logs mean request blocked before your bot 401 logs mean authentication issue.
In short: This is not a code issue. It is a Teams authentication mismatch.
Fixing App ID consistency and verifying authentication setup usually resolves it.
Hope this helps. If you share your auth type, I can help you narrow it down further. Do let me know if you have any further queries.
If this answers your query, please do click Accept Answer and Yes for was this answer helpful.
Thankyou!