首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Microsoft Graph活动提要通知不推送到移动应用程序

Microsoft Graph活动提要通知不推送到移动应用程序
EN

Stack Overflow用户
提问于 2022-03-21 13:17:02
回答 1查看 152关注 0票数 0

我是通过Microsoft发布-ing到MS团队活动源通知。然而,通知只被推送到桌面浏览器应用程序中。

使用( Android和iOS),我们要么没有收到通知,要么得到间歇性的推送通知,而且移动活动源没有显示任何通知项。

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

我有以下有效载荷:

代码语言:javascript
复制
{
    "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 Team应用程序推送通知有问题?

EN

回答 1

Stack Overflow用户

发布于 2022-03-22 12:35:39

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

MS Team版本(Android):1416/1.0.0.2022262002/0313

代码语言:javascript
复制
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"
        }
    ]
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71558262

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档