我需要通过API以编程方式与另一个Outlook用户共享我的用户的主要microsoft outlook日历。
我设法将Oauth2授权与正确的范围(wl.calendars_update
)集成以访问日历。
根据Outlook Calendar REST API reference,我可以从https://outlook.office.com/api/v2.0/me/calendars
成功检索用户的日历。但我们想要的是通过API共享日历。这可能吗?
为了进行比较,Google通过ACL执行此操作。分享所需的代码如下所示:
const headers = { Authorization: `Bearer ${req.pre.user.microsoftAccessToken}` };
const params = { scope: { type: 'user', value: google.calendar.mail }, role: 'freeBusyReader' };
return rp.post(`${google.calendar.apiUrl}/primary/acl`, { json: true, body: params, headers })
.then(() => res({ message: req.i18n.__('shareCalendarSuccess') }))
.catch(err => res(normalizeErr(err)));
答案 0 :(得分:2)
我认为现在不可能。
Outlook.com REST API似乎是最新的:
我也需要这个功能,我在Microsoft UserVoice上写了一个功能请求:Allow to modify calendars share/ACL/permissions using Outlook.com REST API