Microsoft Graph API活动源通知不推送到移动应用程序



POST通过Microsoft Graph API发送到MS Teams活动提要通知。然而,通知仅被推送到桌面浏览器应用程序

使用Microsoft Teams移动应用程序(包括Android和iOS(,我们要么没有收到,要么间歇性推送通知,移动活动订阅源也没有显示我们的任何通知项目。

我正在使用以下端点:https://graph.microsoft.com/v1.0/teams/{GROUP_ID}/sendActivityNotification

我有以下有效载荷:

{
"topic": {
"source": "text",
"value": "Relevant Channel",
"webUrl": "https://teams.microsoft.com/l/entity/{APP_ID}/{ENTITY_ID}?context={"channelId":"{CHANNEL_ID}"}"
},
"activityType": "userMention",
"previewText": {
"content": "App Name"
},
"recipient": {
"@odata.type": "microsoft.graph.aadUserNotificationRecipient",
"userId": "{RECIPIENT_AADOBJECTID}"
},
"templateParameters": [
{
"name": "name",
"value": "My Name"
}
]
}

我的身份验证令牌很好,包含在标头中,并且我的应用程序具有所有必需的权限。


我是在错误的端点发帖,还是在移动设备上向Microsoft Teams应用程序推送通知时出现问题?

我们遵循了这个示例(https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-activity-feed/nodejs)并且能够在MS Teams桌面、Web和移动客户端中获得活动提要通知。

MS Teams版本(Android(:1416/1.0.0.2022262002/0313

POST https://graph.microsoft.com/v1.0/teams/xxxxb29b-2dde-4682-xxxx-4ec85e5bxxxx/sendActivityNotification
{
"topic": {
"source": "entityUrl",
"value": "https://graph.microsoft.com/v1.0/teams/xxxxb29b-2dde-4682-xxxx-4ec85e5bxxxx"
},
"activityType": "pendingFinanceApprovalRequests",
"previewText": {
"content": "Internal spending team has a pending finance approval requests"
},
"recipient": {
"@odata.type": "microsoft.graph.aadUserNotificationRecipient",
"userId": "xxxx3913-2766-4e6f-9edb-90d52bfxxxxx"
},
"templateParameters": [
{
"name": "pendingRequestCount",
"value": "5"
}
]
}

相关内容

最新更新