Microsoft Graph Api通知新的电子邮件到达通知URL

时间:2020-07-21 05:51:35

标签: c# microsoft-graph-api

尽管订阅已成功创建,但是当收到一封新电子邮件时,图形api不会通知通知网址。

    Subscription subscription = new Subscription()
                    {
                        ChangeType = "updated",
                        NotificationUrl = "https notification url",
                        Resource = "users/<useridhere>/messages",
                        ExpirationDateTime = proper utc datetime,
                        ClientState = "a client secret"
                    };

成功创建订阅的响应:

             {
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions/$entity",
    "id": "subscriptionid",
    "resource": "users/samesabove/messages",
    "applicationId": "applicationid",
    "changeType": "updated",
    "clientState": "sameasabove",
    "notificationUrl": "same url as above",
    "expirationDateTime": "2020-07-21T05:17:37Z",
    "creatorId": "creatorid",
    "latestSupportedTlsVersion": "v1_2"
}

任何人都可以透露剩下的步骤或我做错了什么吗?或对此有任何评论

0 个答案:

没有答案