Microsoft graph api sendActivityNotificationToRecipients returning status 202 but not sending any notification. Please check !!!

Swete 0 Reputation points
2026-07-02T09:04:52.3766667+00:00

Hi developers,

I was trying to send activity feed notification to microsoft teams. The api was responding with successful 202 Accepted response however I cannot see any notification in my team app.

i). App is clearly installed in my teams app

Screenshot 2026-07-02 141901 ii). This is my registered app in azure portal

Screenshot 2026-07-02 142903

iii). This is my manifest.json

{
  "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.27/MicrosoftTeams.schema.json",
  "version": "1.0.0",
  "manifestVersion": "1.27",
  "id": "My_external_app_id",
  "name": {
    "short": "SFAndTeamsIntegration",
    "full": ""
  },
  "developer": {
    "name": "Swete",
    "websiteUrl": "https://www.microsoft.com",
    "privacyUrl": "https://www.microsoft.com/privacy",
    "termsOfUseUrl": "https://www.microsoft.com/servicesagreement"
  },
  "description": {
    "short": "Salesforce notifications in Teams",
    "full": "Sends activity feed notifications from Salesforce to Microsoft Teams users."
  },
  "icons": {
    "outline": "outline.png",
    "color": "color.png"
  },
  "accentColor": "#FFFFFF",
  "validDomains": [],
  "webApplicationInfo": {
    "id": "My_client_id",
    "resource": "api://My_client_id"
  },
  "activities": {
    "activityTypes": [
      {
        "type": "salesforceNotification",
        "description": "Salesforce notification",
        "templateText": "{actor} assigned {shiftName}"
      }
    ]
  },
  "authorization": {
    "permissions": {
      "resourceSpecific": [
        {
          "name": "TeamsActivity.Send.User",
          "type": "Application"
        },
        {
          "name": "TeamsAppInstallation.ReadWriteSelfForUser.All",
          "type": "Application"
        },
        {
          "name": "TeamsAppInstallation.ManageSelectedForUser.All",
          "type": "Application"
        },
        {
          "name": "TeamsAppInstallation.Read.All",
          "type": "Application"
        },
        {
          "name": "TeamsAppInstallation.Read.User",
          "type": "Application"
        },
        {
          "name": "TeamsAppInstallation.ReadWriteAndConsentForUser.All",
          "type": "Application"
        },
        {
          "name": "TeamsAppInstallation.ReadWriteAndConsentSelfForUser.All",
          "type": "Application"
        },
        {
          "name": "TeamsAppInstallation.ReadWriteForUser.All",
          "type": "Application"
        },
        {
          "name": "TeamsAppInstallation.ReadWriteSelectedForUser.All",
          "type": "Application"
        },
        {
          "name": "TeamsActivity.Send.Group",
          "type": "Application"
        }
      ]
    }
  }
}

i). This is my api request body

{
    "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"
    },
    "templateParameters": [
        {
            "name": "actor",
            "value": "Sweety"
        },
        {
            "name": "shiftName",
            "value": "Morning Shift"
        }
    ],
    "recipients": [
        {
            "@odata.type": "#microsoft.graph.aadUserNotificationRecipient",
            "userId": "My_user_id"
        }
    ]
}


Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs


1 answer

Sort by: Most helpful
  1. Michelle-N 18,855 Reputation points Microsoft External Staff Moderator
    2026-07-02T10:45:39.07+00:00

    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.id section of your manifest.json matches 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.source is configured as "text", the webUrl parameter is strictly mandatory. Ensure that My_external_app_id matches 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.

    Was this answer helpful?

    0 comments No comments

Your answer

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