Microsoft Graph V1 Teamwork SendActivityNotificationToRecipients Returns 202 Accepted Status Code, but Activity Feed Notification Is Never Received in Microsoft Teams

Jesse Clark 0 Reputation points
2024-12-30T23:11:00.88+00:00

I am attempting to use the Microsoft Graph API to send Activity notifications to recipients in Microsoft Teams. (Using this documentation https://learn.microsoft.com/en-us/graph/api/teamwork-sendactivitynotificationtorecipients?view=graph-rest-1.0&tabs=http) I am using the application TeamsActivity.Send permission.

When I call the bulk notification endpoint via the Graph API, I get a 202 Accepted response. However, the activity notification is never posted to Microsoft Teams.

Here is an example request body with a single user with my app id and user ids removed. I am including my Graph token in the authorization header and have verified that it has the TeamsActivity.Send permission in the roles claim.

{
    "topic": {
        "source": "entityUrl",
        "value": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    },
    "activityType": "systemDefault",
    "previewText": {
        "content": "Internal spending team has a pending finance approval request"
    },
    "recipients": [
    	{
        	"@odata.type": "microsoft.graph.aadUserNotificationRecipient",
        	"userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    	},
		{

        	"@odata.type": "microsoft.graph.aadUserNotificationRecipient",
			"userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
		}
    ],
	"teamsAppId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,702 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.
3,462 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Akhil Nasalwai - MSFT 85 Reputation points Microsoft Vendor
    2024-12-31T15:09:55.31+00:00

    Hello Jesse Clark,

    Thank you for contacting Microsoft!

    Regarding the issue mentioned above, where activity notification is never posted to Microsoft Teams, can you please try the below workarounds and check if this might resolve the issue.

    • Ensure that the teamsAppId matches the ID of the Teams app you have installed.
    • Confirm that the userId values correspond to valid user Id's in your Azure Active Directory.
    • As you are using "activityType" value as systemDefault , ensure that it is an allowed activity type in your Teams app manifest.

    If everything seems in order and it's still not working, I would recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to look into this issue and assist you better. You can raise support ticket from New support request - Microsoft Entra admin center or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.