How to fix Azure Bot Service fails authentication: AADSTS700016 – App Registration “not found” after switching tenant settings

Joost Vagevuur | Barney Media 0 Reputation points
2025-11-28T13:03:40.1833333+00:00

Hello,

I am experiencing an authentication failure between Azure Bot Service and my Azure AD App Registration.

The bot is built with the Python Bot Framework SDK and works correctly in other environments.

However, in this Azure setup, Azure Bot Service cannot authenticate using the Microsoft App ID and secret, even though they are correct and freshly regenerated.

🔴 Error Messages

Azure Bot App Service logs repeatedly show:

get_user_token exception: Operation returned an invalid status code 'Unauthorized'

and sometimes when it switch to single tenant:

AADSTS700016: Application with identifier '{APP-ID}'

was not found in the directory 'Bot Framework'.

You may have sent the authentication request to the wrong tenant.

Whenever this happens, the bot fails immediately with:

Operation returned an invalid status code 'Unauthorized'

Adapter cannot authenticate → Bot cannot send activities

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.