GuillaumeStD
Nov 02, 2022Copper Contributor
[Error] Subscribe to messages of any chat where my bot is installed
Hi,
I am trying to subscribe to messages events of any chat where my bot is installed using this endpoint :
https://learn.microsoft.com/en-us/graph/teams-changenotifications-chatmessage#subscribe-to-messages-of-any-chat-in-a-tenant-where-a-specific-teams-app-is-installed-preview
Unfortunately, when calling this endpoint I get this error :
{
"error": {
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Status Code: Forbidden; Reason: AAD App Id 'XXX' is not allowed to manage the Teams App 'YYY'.]",
"innerError": {
"date": "2022-10-27T10:25:13",
"request-id": "c2d30aa0-eade-4324-9df7-71696d2a5bbc",
"client-request-id": "c2d30aa0-eade-4324-9df7-71696d2a5bbc"
}
}
}
Note that for security reasons I have masked my AppId and TeamsAppId from the above error. I have checked them and they are correct.
I have tried granting my token the following permissions (TeamsAppInstallation.ReadWriteForChat.All, TeamsAppInstallation.ReadWriteForTeam.All, TeamsAppInstallation.ReadWriteForUser.All), but I still get the same error.
Any help would be appreciated.