Hi @Tom Carmi
Thank you for posting your question in the Microsoft Q&A forum.
A bot registered only in the Microsoft Teams Developer Portal cannot send outbound messages in a real Microsoft Teams tenant. The Developer Portal registration is intended for design-time configuration only and does not create a bot identity in the Bot Framework Service, establish trust with smba.trafficmanager.net, or authorize outbound message transport. As a result, all outbound message attempts will consistently fail with HTTP 401 Unauthorized, regardless of the SDK, programming language, or API permissions used.
To send outbound messages through https://smba.trafficmanager.net, the bot must be backed by an Azure Bot resource such as Bot Channels Registration or Azure Bot that is linked to the same Microsoft Entra App ID. This Azure resource registers the App ID in the Bot Framework Service, enables outbound messaging, issues valid Bot Connector tokens, and authorizes calls to smba.trafficmanager.net. Without this resource, outbound messaging is not supported in real tenants or production environments.
Unfortunately, there is no supported alternative for sending outbound messages via smba.trafficmanager.net without Azure Bot registration.
The available options are:
-Ask your IT admin to register the Azure Bot resource in the tenant. This does not require hosting in Azure, you can still run locally with ngrok. The registration is only for identity and channel configuration.
-Or use the Microsoft 365 Developer Program sandbox, which provides a free Microsoft 365 tenant and linked Azure subscription. However, this is for development and testing purposes only and does not provide access to your company’s real tenant.
I hope this information is helpful.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.