Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
Hi @Swete
Based on your description and provided configurations, I understand that you are using the Microsoft Graph API (sendActivityNotificationToRecipients) to send activity feed notifications from Salesforce to Microsoft Teams. Although the API returns a successful HTTP 202 Accepted response, the notification is not actually appearing in the user's Teams app.
In Microsoft Graph, an HTTP 202 Accepted response simply means that the Graph gateway validated your request structure and queued it for processing. It does not guarantee that the Teams backend successfully rendered the message on the client application. If a silent failure occurs downstream during processing, nothing will show up.
In Microsoft Teams activity feed notifications, {actor} is a system-reserved parameter. You cannot manually pass a custom text value for actor in the templateParameters array.
- For Delegated permissions calls, Teams automatically sets the actor as the display name of the authenticated user who initiated the API call.
- For Application permissions calls (which you seem to be using based on your manifest roles), Teams automatically sets the actor as the Name of your Teams App.
Because of this system conflict, passing a custom parameter named "actor" causes the rendering engine to reject the payload silently.
Please refer the following document: Send activity feed notifications to users in Microsoft Teams
Please try update your manifest.json activities block to avoid using {actor} if you want a custom name, or let Teams handle it natively. For example:
"templateText": "{shiftName} has been assigned"// OR if you want custom text:"templateText": "{assignedBy} assigned {shiftName}"
Remove the "actor" object from your templateParameters array.
Additionally, when sending notifications at scale or via application tokens, it is recommended to explicitly pass the teamsAppId in the root of the JSON body so Teams knows exactly which local app context to trigger.
Try using this modified payload:
{
"topic": {
"source": "text",
"value": "New Notification From Salesforce",
"webUrl": "https://teams.microsoft.com/l/entity/My_external_app_id/default" },
"activityType": "salesforceNotification",
"previewText": {
"content": "This is Salesforce to Teams integration notification" },
"teamsAppId": "My_external_app_id",
"templateParameters": [
{
"name": "shiftName",
"value": "Morning Shift" }
],
"recipients": [
{
"@odata.type": "#microsoft.graph.aadUserNotificationRecipient",
"userId": "My_user_id" }
]
}
If the issue persists after updating the payload, please verify the following:
- App Installation Scope: The Teams app must be explicitly installed for the target recipient user (
My_user_id), either as a personal app or within a team/chat where that user is a member. Merely publishing it to your organization's app catalog does not suffice; the user must have an active installation instance. - App Registration Matching: Double-check that the App ID defined in the
webApplicationInfo.idsection of yourmanifest.jsonmatches the Microsoft Entra Application (Client) ID that your backend architecture uses to acquire its Graph OAuth access token. - Topic Web URL Validation: Since your
topic.sourceis configured as"text", thewebUrlparameter is strictly mandatory. Ensure thatMy_external_app_idmatches the App ID defined in your manifest.
To isolate whether the issue is related to the bulk recipient routing engine, try testing with the single-user endpoint first:
POST /v1.0/users/{userId}/teamwork/sendActivityNotification
Unlike the bulk endpoint, the single-user endpoint returns an immediate HTTP 204 No Content upon successful client delivery. It is much easier to debug and verify payload structure here before moving your logic over to the bulk /teamwork/sendActivityNotificationToRecipients endpoint.
Give this updated payload a try and let me know if your activity feed updates!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click ""Comment"".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.