How to integrate Genie chatbot through Foundry?

Lorena Basulto (Contractor) 0 Reputation points
2025-07-10T18:30:50.2366667+00:00

I am having trouble integrating web chatbot using Databricks Genie through Azure Foundry AI. I've tried managed identity and appID + secret and also assigning various permissions to both, but it hasn't worked.

Components involved:

Web App

Azure Bot

Azure AI Foundry

Interactions:

Web App -> Bot Framework: Authentication using APP ID + Secret (ClientSecretCredential)

Web App -> Foundry: Managed Identity or ClientSecretCredential (have tried both)

Error:

ERROR:app:Error processing request: Failed to get access token with error: unauthorized_client, error_description: AADSTS700016: Application with identifier X 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. Trace ID: X Correlation ID: X Timestamp: X

I have tried everything from second answer in this link and have had no luck so far.

Tutorial used:

Tutorial: Deploy an enterprise chat web app

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

1 answer

Sort by: Most helpful
  1. Ravada Shivaprasad 1,115 Reputation points Microsoft External Staff Moderator
    2025-07-10T22:29:07.8133333+00:00

    Hi Lorena Basulto (Contractor)

    The error AADSTS700016: Application with identifier X was not found in the directory 'Bot Framework' typically indicates that Azure Active Directory (AAD) cannot locate the application registration in the specified tenant. This issue arises when the App ID used for authentication is either incorrect, not registered in the tenant you're targeting, or the authentication request is being sent to the wrong tenant endpoint. In your architecture, the web app communicates with Azure Bot Framework using ClientSecretCredential (App ID + Secret), and with Azure AI Foundry using either Managed Identity or ClientSecretCredential. Both methods are failing due to an unauthorized_client error, which points to a misalignment between the app registration and the tenant configuration.

    To resolve this, first verify that the App ID is correctly registered in the Azure Portal under the App Registrations section, and ensure it belongs to the correct tenant. If the app is intended to be multi-tenant, confirm that it is properly configured as such and that administrative consent has been granted. You can use the admin consent URL to explicitly grant permissions:

    https://login.microsoftonline.com/{tenant-id}/adminconsent?client_id={app-id}.
    
    

    Additionally, validate that the credentials used—whether a client secret or managed identity—are correctly configured and active. For ClientSecretCredential, ensure the secret is valid and not expired. For Managed Identity, confirm that it is enabled on the web app and has the necessary access to Azure AI Foundry. Also, check that the required API permissions are added and granted in the app registration, especially for accessing Microsoft Bot APIs.

    References : Configure your AI project to use Azure AI Foundry Models , Microsoft TechCommunity: Azure AI Foundry/Azure AI Service - cannot access agents

    Hope this Helps!

    Thanks


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.