Forum Discussion
[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.
- husniddinCopper ContributorAny updates regarding to this issue? I'm facing the same problem.
You can review the details in this github issue: https://github.com/MicrosoftDocs/msteams-docs/issues/8763 - RamjotSinghMicrosoftCouple of questions
1. Are you still seeing this error?
2. Is this a sideloaded app, store app or organizational app?
3. Can you paste the webApplicationInfo section of the teams app manifest? You can mask the appId if needed- Meghana-MSFTMicrosoft
GuillaumeStD - Can you please share above details.
- Meghana-MSFTMicrosoftWe are looking into this, we will get back to you.
- Meghana-MSFTMicrosoftBased on the logs the request POST ChangeNotificationSubscription/CreateSubscription has failed with 403. Can you please check and confirm if the subscription was created successfully?
- GuillaumeStDCopper Contributor
Meghana-MSFT The subscription wasn't created since the above request to create it failed.