Unable to send notification to teams installed application users

Copper Contributor

I've a custom app built for my organization, and I've deployed the same using the "Teams Toolkit > Zip App Package > For Azure" and added the botId: '28c8b3b1-xxxx-xxxx-xxxx-xxxxxxxxxxxx' in the manifest.json. I'm able to see and manage the app in "Apps: Developer Portal (microsoft.com)" and the bot in "Bot management: Developer Portal (microsoft.com)" as well as in "Bot Framework". But when a user is installing the app from their team's app, a "Participant Join" event is getting fired up, and hitting the endpoint but when the code is trying to fetch the list of installation then I'm getting an exception

 
 

a7e74221-ef9e-4494-bdea-32e35c31bc01.png

 

Note: The deployed .NET application is having only BOT_ID and BOT_PASSWORD which I got from the "portal.azure" or from "Bot Management",

 

Does anyone know how I can fix this or if I'm missing something, if so, then please reply as soon as possible as we're having a production deadline coming up and it would be very helpful of you to solve this problem.

 

Thanks in advance.

7 Replies

This can happen if you might have misconfigured the identifier value for the application or sent your authentication request to the wrong tenant. 

1. Verify Application Identifier:

  • Ensure that the correct appId or client id is being used in the manifest.json file. The botId should match the appId of the bot registration in Azure.
  • Check the appId in the Azure portal under the bot registration to confirm it matches the one in the manifest.json file.

2. Check Application Installation:

  • Make sure that the application has been installed by the administrator of the tenant or consented to by any user in the tenant.
  • Verify that the app has been uploaded to the organization's App Catalog and is available for installation by users in the organization.

3. Add Required Permissions:

  • Confirm if the required Microsoft Graph Application-level permissions 'TeamsAppInstallation.ReadWriteForUser.All' have been added to the Azure AD app registration associated with your bot.

4. Update App Settings:

  • Ensure that the appsettings.json file contains the correct ids and secret details related to the bot registration in Azure.

Similar issue here: Message: AADSTS700016: Application with identifier not found in the directory (domain name). error l...
You can also refer:

Fix - AADSTS700016: Application not found or consented to by any user. (morgantechspace.com)

 

 

However, if you have any business critical issue which need immediate attention, please raise a support request here:  
https://docs.microsoft.com/en-us/microsoft-365/admin/get-help-support?view=o365-worldwide&tabs=onlin... 

 

 

 

Thanks, 

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. 

@Prasad_Das-MSFT Hey thanks for the quick reply, I've the necessary permissions, but the problem is the exception is saying, that it is not able to find the BOT in the BOT framework, even though I've the same bot registered there and used the same ID (Application ID) i.e.,28c8b3b1-xxxxx-xxxxx-xxxxx.
As well as able to find it at "https://dev.botframework.com/bots/channels?id=28c8b3b1-xxxx-xxxx-xxx-xxxxxxxx"

sarkarprashant_0-1716884586372.png

 

@sarkarprashant - While creating app could you please choose the below option and enter the redirect URI for the app in the following format:

https://token.botframework.com/.auth/web/redirect

Prasad_DasMSFT_0-1717050395911.png

 

@Prasad_Das-MSFT I've not registered any application like this, instead I've uploaded the app.dev zip package to "https://dev.teams.microsoft.com/apps" and added a bot to "https://dev.teams.microsoft.com/bots" which also showed my bot in bot framework i.e., "https://dev.botframework.com/bots/channels?id=28c8b3b1-xxxxxxxx". And on the bot framework I'm getting this error as well

sarkarprashant_0-1717050678131.png

 

@sarkarprashant - Could you please check this thread and let us know if it helps you in any way?
azure ad b2c - AADSTS700016: Application with identifier 'some_id' was not found in the directory 's...

 

@Prasad_Das-MSFT , hi and thanks for the response. My query is resolved automatically as I think that Microsoft was taking some time to complete the process of app upload.
But I'm getting error when trying to get the user details. Do you have any idea what permissions do I need to give to the bot using Admin privileges so that I don't get response of forbidden.Permission_3.pngPermission_2.pngPermission_1.pngBot_framework.pngCode.pngException.png

@sarkarprashant 

Currently, to retrieve information for a team, use the Teams bot APIs TeamsInfo.GetMemberDetailsAsync for C# or TeamsInfo.getTeamDetails for TypeScript.

Get Teams specific context for your bot - Teams | Microsoft Learn

You need to have these permissions:
List group members - Microsoft Graph v1.0 | Microsoft Learn