AADSTS700016: Application with identifier 'xxxxxxxxxxx' was not found in the directory 'Bot Framework'.

Mathis LAURENT 40 Reputation points
2025-07-24T12:26:57.3733333+00:00

Hello, while trying to request to my bot I find myself with this issue in the logs.

PermissionError: Failed to get access token with error: unauthorized_client, error_description: AADSTS700016: Application with identifier 'xxxxxxxxxxx' was not found in the directory 'Bot Framework'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.

I already tried what was in the others Q&A relative to this issue but I still got this message.

Does someone happen to have another idea ?

Thanks

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

Accepted answer
  1. Sina Salam 22,576 Reputation points Volunteer Moderator
    2025-07-31T16:41:15.8466667+00:00

    Hello Mathis LAURENT,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are having AADSTS700016: Application with identifier 'xxxxxxxxxxx' was not found in the directory 'Bot Framework' error.

    If you're manually requesting tokens, check Authentication Code and make sure your code uses the correct:

    • Client ID
    • Tenant ID
    • Authority URL
    • Scopes

    For the fact that the error is related to Azure Active Directory (AAD) authentication and typically means that the bot's Azure AD app registration is either misconfigured or not properly recognized by the tenant. The error suggests the request might be going to the wrong tenant. So, in your bot configuration or authentication request, check that you're using the correct tenant ID or common/multi-tenant endpoint if applicable such as:

    And if the app is multi-tenant, ensure that admin consent has been granted in the target tenant:

    • Go to API permissions in the app registration and verify.
    • Required permissions are listed.
    • Admin consent has been granted (especially for delegated permissions).

    Among many things you can do:

    • Use Azure AD Graph Explorer to test token requests and validate permissions, and;
    • Try using Microsoft Authentication Library (MSAL) for token acquisition—it handles many edge cases.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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