I am developing a custom Teams app consisting of a tab app and a bot app. The bot app is designed to send Adaptive Cards triggered by an external HTTP POST request. The accountId in the POST request determines which user's bot app the card is sent to. The accountId means aadObjectId.
However, I occasionally encounter a 'Conversation not found' error when sending these Adaptive Cards. This happens inconsistently, even with the same user, and can occur even if the user has not uninstalled the app.
Here are some details about the app:
- The conversation ID is obtained from the first conversation with the user and is stored in an Azure storage account.
- The conversation ID is not updated once it has been obtained.
- The bot is used in a 1:1 chat.
- The conversation ID is obtained from the tab app's context.
I have checked the official Microsoft documentation and understand that this error can occur if the bot does not have access to the team or channel, or if the conversation ID is incorrect. However, I am not sure why this error is occurring inconsistently and how to fix it.
Does anyone have any insights or suggestions on how to resolve this issue? Any help would be greatly appreciated.
Also, are there any cases where the conversation ID gets updated? If you know, please let me know.
Expectation:
- To be able to send Adaptive Cards without encountering the 'Conversation not found' error.
What I checked:
- The chat has not been deleted on the Teams side.
- The app has not been uninstalled.