无法在 Microsoft Graph 中检索来宾用户日历事件 [英] Unable to retrieve guest users calendar events in Microsoft Graph
问题描述
我在公司租户中的 azure AD 中创建了一个应用程序.在应用权限中,我添加了应用权限类型的 Calendars.Read 和 Calendars.ReadWrite(在所有邮箱中读取和写入日历),并且我已授予管理员同意.
I have created an app in azure AD, in my company tenant. In application permissions, I have added Calendars.Read and Calendars.ReadWrite (Read and write calendars in all mailboxes) with application permission type, and I have grant admin consent.
在用户中,我已将具有个人 Microsoft 帐户 (outlook.com) 的用户添加为来宾用户.
In users, I have added user with personal Microsoft account (outlook.com) as a guest user.
当我为会员用户调用图表时,我能够接收日历事件(并创建新事件),但是当我为访客用户调用图表时,我收到异常 MailboxNotEnabledForRESTAPI.消息:此邮箱尚不支持 REST API.
When I am calling a graph for Member users, I am able to receive calendar events (and create a new ones), but when I am calling a graph for a Guest users I get exception MailboxNotEnabledForRESTAPI. Message: REST API is not yet supported for this mailbox.
是否有一些限制,我只能为会员用户创建事件,或者我配置错误?
Is there some limitation that I can create event only to a Member user, or I have miss-configured something?
推荐答案
您只能阅读租户中用户的邮件/日历事件.因此,最好使用 userType eq 'member' 过滤用户.https://graph.microsoft.com/v1.0/users?$filter=userType eq 'member'
You can only read mails/calendar events of users in your tenant only. So, it's better to filter users using userType eq 'member'. https://graph.microsoft.com/v1.0/users?$filter=userType eq 'member'
这篇关于无法在 Microsoft Graph 中检索来宾用户日历事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!