Hello,
I am trying to programmaticaly add a bot to a group chat.
Doing a POST call to : https://graph.microsoft.com/v1.0/chats/{{chatid}}/installedApps
{
"teamsApp@odata.bind":"https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{{appid}}"
}
Yields :
{
"error": {
"code": "NotFound",
"message": "NotFound",
"innerError": {
"message": "",
"code": "AppDefinitionDoesntExist",
"innerError": {},
"date": "2023-10-05T19:42:40",
"request-id": "<Redacted>",
"client-request-id": "<Redacted>"
}
}
}
The private app is only installed for our tenant. I also tried with a version of the bot installed localy only for myself's Teams client with no success.
I have the permission TeamsAppInstallation.ReadWriteForChat.All showing in the portal.azure.
I can add the bot application manualy to the Teams chat through the UI without issue. Through F12 on chrome I can see the same appid for the bot that I am using in my POST InstalledApps call. I notice that the web interface of Teams is calling https://teams.microsoft.com/api/apps/part/amer-02/beta/chats/{{chatid}}/apps/entitlements endpoint which is not the graphapi.
Anyone has an idea how to make this work?
Thanks!