[Error] Subscribe to messages of any chat where my bot is installed

Copper Contributor

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-...

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.

11 Replies
We are looking into this, we will get back to you.
Based on the logs the request POST ChangeNotificationSubscription/CreateSubscription has failed with 403. Can you please check and confirm if the subscription was created successfully?


@Meghana-MSFT The subscription wasn't created since the above request to create it failed.

We are trying to create a subscription and checking at the logs as well. We will get back to you.
We are also getting issues while creating subscription. We are checking with engineering team on this. We will get back to you.
Engineering team has said that "The error means that AAD app is not part of Teams App that subscription is trying to be created for". Can you please confirm this?

@GuillaumeStD - Can you please confirm above ask?

@Meghana-MSFT AAD app is part of Teams app here though. That's why I asked for help.

Couple 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

@GuillaumeStD - Can you please share above details.

Any 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