Notifications on Teams Tab not working

David Cabielles Hernández 21 Reputation points
2022-02-21T18:25:21.81+00:00

Hi,

I'm developing a Teams App based on a Tab (no team, no bot, just a Tab).
I'm trying to send notifications to the app but I get the following error:
"message": "The app installation id, 'XXX', provided in the topic is not a valid app installation id.",

The access token is working fine, but I can't find any info about this error. I added the permissions as are specified here: https://learn.microsoft.com/en-us/graph/api/userteamwork-sendactivitynotification?view=graph-rest-1.0&tabs=http

My request is this: https://graph.microsoft.com/v1.0/users/MYUSERID/teamwork/sendActivityNotification

And my request body is the following:

{  
    "topic": {  
        "source": "entityUrl",  
        "value":  
        "https://graph.microsoft.com/v1.0/users/MYUSERID/teamwork/installedApps/XXX"  
    },  
    "activityType": "messages",  
    "previewText": {  
        "content": "New Task Created"  
    },  
    "templateParameters": [  
        {  
        "name": "taskId",  
        "value": "Task 12322"  
        }  
    ]  
}  

My ID for the app is the id showed on azure, but I can't do nothing with this error.

Thank you in advance!

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,120 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,645 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,866 questions
{count} votes

Accepted answer
  1. Nivedipa-MSFT 2,806 Reputation points Microsoft Vendor
    2022-02-23T07:48:45.317+00:00

    Adding answer from comment section for more visibility.

    You have to use the INSTALLATION ID of the app instead of APP ID

    You have to recover the INSTALLATION ID of the app.

    You can recover it on the next endpoint:
    https://graph.microsoft.com/v1.0/users/{USERID}/teamwork/installedApps?$expand=teamsApp,teamsAppDefinition&$filter=teamsApp/externalId eq '{APP ID OF THE MANIFEST}'

    Ref Doc: https://learn.microsoft.com/en-us/graph/api/userteamwork-list-installedapps?view=graph-rest-1.0&tabs=http#example-3-get-the-app-installation-resource-based-on-the-manifest-id-of-the-associated-app

    Thanks,
    Nivedipa


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful