Hello, community and Microsoft engineers.
I've been struggling for days with a Bot Service authentication issue and would appreciate your expertise.
The Setup:
- Backend: A Python FastAPI app hosted on Google Cloud Run. The endpoint is
https://teams-alfred-bridge-1046601765278.us-central1.run.app/api/messages.
Azure: A Bot Service (Conselho-IAs-V2) and an App Registration (63923d24-...).
The Problem: When I use the "Test in Web Chat" feature in the Azure Portal, it fails with HTTP status code Unauthorized.
What I've verified (This is why I'm stuck):
The Google Cloud Run endpoint is 100% public (allows unauthenticated invocations) and is healthy.
When I test, absolutely no logs (no requests, no errors) appear on my Google Cloud Run service. This proves the request is never leaving the Azure ecosystem.
I have regenerated the Client Secret multiple times, copied it perfectly, and synced it to my backend's environment variables. The MICROSOFT_APP_ID and MICROSOFT_APP_PASSWORD are correct.
My Python code uses the official botbuilder-core SDK with the correct authentication settings.
My Question: Since my backend is never reached, the 401 Unauthorized error seems to be generated internally by the Azure Bot Service test harness. Could this be an issue with my App Registration's tenant configuration (e.g., Single-tenant vs. Multi-tenant)? Or is there a known bug with the "Test in Web Chat" feature that would prevent it from calling an external endpoint even if the credentials are correct?
Thank you for any insights!Hello, community and Microsoft engineers.
I've been struggling for days with a Bot Service authentication issue and would appreciate your expertise.
The Setup:
Backend: A Python FastAPI app hosted on Google Cloud Run. The endpoint is https://teams-alfred-bridge-1046601765278.us-central1.run.app/api/messages.
Azure: A Bot Service (Conselho-IAs-V2) and an App Registration (63923d24-...).
The Problem:
When I use the "Test in Web Chat" feature in the Azure Portal, it fails with HTTP status code Unauthorized.
What I've verified (This is why I'm stuck):
The Google Cloud Run endpoint is 100% public (allows unauthenticated invocations) and is healthy.
When I test, absolutely no logs (no requests, no errors) appear on my Google Cloud Run service. This proves the request is never leaving the Azure ecosystem.
I have regenerated the Client Secret multiple times, copied it perfectly, and synced it to my backend's environment variables. The MICROSOFT_APP_ID and MICROSOFT_APP_PASSWORD are correct.
My Python code uses the official botbuilder-core SDK with the correct authentication settings.
My Question:
Since my backend is never reached, the 401 Unauthorized error seems to be generated internally by the Azure Bot Service test harness. Could this be an issue with my App Registration's tenant configuration (e.g., Single-tenant vs. Multi-tenant)? Or is there a known bug with the "Test in Web Chat" feature that would prevent it from calling an external endpoint even if the credentials are correct?
Thank you for any insights!