共享邮箱中的图形补丁类别
我正在尝试通过MS Graph从Outlook Addin设置邮件类别。 当我调用用户邮箱的补丁程序时,这就像Charme一样工作。像这样:
补丁https://graph.microsoft.com/v1.0/users/ {some-users-mail-address}/message/{message -id-id-to-to-to-categorize}
如果我改用共享邮箱,我会收到错误403。 我已经添加了许可:
Mail.ReadWrite
Application
Read and write mail in all mailboxes
这应该足够了,对吗?从描述中,我希望这也包括共享的邮箱。
我发现有一个委派的权限mail.readwrite.shared
,但是我无法使用它,因为我不在用户的上下文中,也不能作为应用程序许可。
发现了这一点: 生成的图表不是能够访问Graph API以读取共享的邮箱消息 所有范围均给予管理员同意。
编辑:如果我检查令牌时,湿婆keshav varma建议它打印:
"aud": "https://graph.microsoft.com",
"idtyp": "app",
"roles": [
"Mail.ReadWrite",
"User.ReadWrite.All",
"Directory.Read.All",
"User.Read.All",
"Mail.Read",
"MailboxSettings.ReadWrite"
],
"ver": "1.0",
I am trying to set mail categories from an Outlook AddIn, via MS Graph.
When I call the PATCH for a users mailbox, this is working like a charme. Like this:
PATCH https://graph.microsoft.com/v1.0/users/{some-users-mail-address}/messages/{message-id-to-categorize}
If I use a share mailbox instead I get an error 403.
I already added the permission:
Mail.ReadWrite
Application
Read and write mail in all mailboxes
This should be enough, right? From the description, I'd expect this to include the shared mailboxes, too.
I found there is a delegated permission Mail.ReadWrite.Shared
, but I cannot use it since I am not in a context with a user and is not selectable as application permission.
Found this:
Generated token is not able to access Graph APi to read shared mailbox messages
Admin consent is given for all scopes.
EDIT: If I check the token as Shiva Keshav Varma suggested it prints:
"aud": "https://graph.microsoft.com",
"idtyp": "app",
"roles": [
"Mail.ReadWrite",
"User.ReadWrite.All",
"Directory.Read.All",
"User.Read.All",
"Mail.Read",
"MailboxSettings.ReadWrite"
],
"ver": "1.0",
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论