'MS Teams activity feed notifications don't arrive to mobile

I've successfully implemented activity feed notifications in my app (tab) for MS Teams.

The problem is, I don't receive them on mobile devices: neither push notifications nor items in the activity feed. The activity feeds on web and desktop are populated with the same items, but the mobile one has nothing.

Web and desktop versions work perfectly fine: the notifications get delivered in a timely fashion and deep links point the user to the correct tab with subEntityId correctly filled.

I tried all three options: chat, team and user notifications. Web and desktop are fine, but nothing on mobile.

There must be something I'm missing here. Can somebody please point that out? Maybe, you know of an example that is known to work for mobiles?

I'm using the official Graph library "@microsoft/microsoft-graph-client": "^3.0.1".

This is what I send in a notification:

{
    activityType: "message",
    chainId: getChainId(),
    recipient: {
        "@odata.type": "microsoft.graph.aadUserNotificationRecipient",
        userId: targetUserId,
    },
    previewText: {
        contentType: "text",
        content: `From: ${authorName}`,
    },
    topic: {
        source: "text",
        value: `New message in ${chatName}`,
        webUrl: getWebUrl(messageId, authorName, appId),
    },
    templateParameters: [
        {
            name: "tabName",
            value: tabName,
        },
    ],
}

UPDATE 22.12.2021: With some experimenting, I can now see push notifications on iOS. But no feed items still and nothing at all on Android.



Solution 1:[1]

We had the exact issue and talked to multiple Microsoft resources for months. It was fixed yesterday. The problem was on Microsoft's end, they had to "whitelist" our app to enable Activity feed notifications for mobile (Android and iOS). Like you, we also had desktop client and web browser Teams working correctly.

Here is the official Microsoft reply:

Regarding the issue, you mentioned that Activity and notifications don't work on mobile (iOS and Android). The issue resolved by Product Group(PG) after adding this app to whitelist. According to PG an app needs to be added to whitelist so that it can send notifications to mobile devices.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 goamn