Forum Discussion
Application with identifier was not found in the directory Bot Framework
Hi, I have created a Bot Service for a single tenant. I have created the manifest file with the Bot's ID and successfully uploaded it to Teams and approved it. I do see the App in Teams. I also tested it with a Bot Emulator locally and it worked.
But when I tested it (locally using ngrok) with Bot Service "Test in Web Chat" and setting the messeging endpoint to https://xxxx.ngrok/api/messages, it failed with "Application with identifier XXX 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".
I know the AppID is correct as I copy and paste it from the Bot Service. How do I put it in the "directory Bot Framework".
Thanks in advance!
5 Replies
- Prasad_Das-MSFT
Microsoft
aymiee - As mentioned here, the cause of this kind of issues might be "the
Issuerattribute sent from the application to Azure AD in the SAML request doesn’t match the Identifier value that's configured for the application in Azure AD."
Steps to follow:1. Please double check the configuration? This mostly happen when we make mistake while configuring it. Please follow this doc to understand more - https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/authentication/add-authentication?tabs=dotnet%2Cdotnet-sample#azure-ad-v2
2. Double check what AppType your Azure Bot resource is and make sure your env file is correct. Please update the AppType your
envfile toSingleTenantand supply yourTenantIdto communicate with the bot.3. Another reason might be your bot registered into your tenant (and not the global bot framework). So, you can get the access token by changing the URL to the following (replacing with your tenant id):
https://login.microsoftonline.com/YOUR-TENANT-ID/oauth2/v2.0/tokenThanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
- PGerardiCopper Contributor
- Prasad_Das-MSFT
Microsoft
PGerardi - In your code where you have implemented the function to get access token
- aymieeBrass ContributorThanks for your help. I ended using the Bot Framework Composer to deploy my Azure Bot. I am not having issues above any but I am having issues with:
OperationName - SendActivity:ChannelToBot
Channel - directline
ResultCode 404
Type - ABSBotRequests
It's a bit frustrating because it works locally via the Bot Framework Emulator but doesn't when I am calling it in the Test Web App.
I've gone through every config settings.. (signInAudience set to AzureADMyOrg for single-tenant)
Back to the drawing board...- Prasad_Das-MSFT
Microsoft
aymiee - Was there any progress made? If you've checked Bot's Permissions, Bot Endpoint etc and your bot is still not receiving messages, you might need to debug your bot's code to identify the issue.