Microsoft Graph-订阅日历通知时出错 [英] Microsoft Graph - Error when subscribing to calendar notifications

查看:244
本文介绍了Microsoft Graph-订阅日历通知时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图为我的一个日历的通知设置订阅,但是出现以下错误:

I was trying to set up a subscription to the notifications of one of my calendars, but am getting the following error:

{
  "error": {
    "code": "ExtensionError",
    "message": "Operation: Create; Exception: [Status Code: NotFound; Reason: Not Found]",
    "innerError": {
      "request-id": "XXXXXXXXXXX",
      "date": "2018-07-13T13:32:37"
    }
  }
}

我认为该请求是正确的:

I believe the request is correct:

{
   "changeType": "created,updated,deleted",
   "notificationUrl": "https://(...)/outlook/notifications",
   "resource": "me/calendars/{calendar_id}/events",
   "expirationDateTime":"2018-07-16T10:00:00.000Z",
   "clientState": "OutlookIntegration"
}

关于可能发生什么的任何提示?预先感谢.

Any hint on what may be happening? Thanks in advance.

推荐答案

您不能将/me与应用程序令牌一起使用.

You can't use /me with an application token.

除非令牌中包含用户信息,否则图形不知道我"是什么.

Graph doesn't know what "me" is unless there is user info in the token.

您必须指定用户的对象ID或用户主体名称,而不是"me".像:users/object-id-here.

You'll have to specify the user's object id or user principal name instead of "me". Like: users/object-id-here.

这篇关于Microsoft Graph-订阅日历通知时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆