Sta*_*arx 6 calendar azure office365 outlook-restapi microsoft-graph-api
这个问题已经被问了几次,并按照回答诸如这样看来API不支持此则直到最近因为在这里,其中提到有新的范围,允许访问共享的日历。但它仍然不起作用。
我在两个平台上对此进行了测试:Azure 和 Microsoft Graph
我调用 Office API v.1.0 为:
授权网址:
Run Code Online (Sandbox Code Playgroud)https://login.microsoftonline.com/common/oauth2/authorize?client_id=%1$s&redirect_uri=%2$s&response_type=code代币网址:
https://login.microsoftonline.com/common/oauth2/token日历网址:
https://outlook.office.com/api/v1.0/Me/Calendars
它只给我当前登录/授权用户创建的日历。
由于这不起作用,我尝试使用 API 的第 2 版,但得到以下结果:
Run Code Online (Sandbox Code Playgroud)Additional technical information: Correlation ID: 7abf370a-d918-4514-bd74-cf5fc93fe3cf Timestamp: 2016-10-31 09:32:06Z AADSTS70001: Application 'f7571710-84e2-4444-8bfe-5eef92f4a46d' is not supported for this API version.
所以我尝试使用 Microsoft Graph 应用程序
我这里的应用程序还包含所有必需的权限。
我调用 office API v2.0 为:
授权网址:
Run Code Online (Sandbox Code Playgroud)https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=%1$s&redirect_uri=%2$s&response_type=code&scope=%3$s范围是:
Run Code Online (Sandbox Code Playgroud)private static $scopes = array( 'https://outlook.office.com/calendars.read', 'https://outlook.office.com/calendars.readwrite', 'https://outlook.office.com/calendars.read.shared', 'https://outlook.office.com/calendars.readwrite.shared', );代币网址:
https://login.microsoftonline.com/common/oauth2/v2.0/token日历网址:
https://outlook.office.com/api/v2.0/Me/Calendars
再次不给我共享日历。
任何帮助表示赞赏。
这里发生了很多事情:)然而,这里的关键似乎是您期望/Me/Calendars包含共享日历。它不是。为了访问他人共享的日历,您必须通过/Users/<id>/Calendars/URL 进行访问。
例如,如果 bob@contoso.com 登录,并且 bill@contoso.com 已与他共享他的日历,则:
/Me/Calendars只会显示 Bob 邮箱中的日历/Users/bill@contoso.com/Calendars将显示比尔与鲍勃共享的日历更新:我们这边似乎存在阻塞问题。我们正在努力。
| 归档时间: |
|
| 查看次数: |
10054 次 |
| 最近记录: |