【问题标题】:Microsoft Graph API - List all Users who have access to a mail item?Microsoft Graph API - 列出所有有权访问邮件项目的用户?
【发布时间】:2020-02-20 18:27:33
【问题描述】:

我希望能够拥有可以查看某个邮件项目的所有用户的列表。作为在线交换前端的管理员,我可以查看所有用户的邮件,但是当我调用 API 时,我只返回我的邮件。我希望能够拨打电话以准确查看谁有权查看每个邮件项目,并且无法通过 api 找到方法。

我可以获得所有用户的列表,以及每个用户的所有邮件列表,所有邮箱列表,所有组列表,但不能获得每个邮件项的权限

GET /users/{id | userPrincipalName}/messages

返回所有邮件,但邮件项具有以下结构:

{
  "bccRecipients": [{"@odata.type": "microsoft.graph.recipient"}],
  "body": {"@odata.type": "microsoft.graph.itemBody"},
  "bodyPreview": "string",
  "categories": ["string"],
  "ccRecipients": [{"@odata.type": "microsoft.graph.recipient"}],
  "changeKey": "string",
  "conversationId": "string",
  "createdDateTime": "String (timestamp)",
  "flag": {"@odata.type": "microsoft.graph.followupFlag"},
  "from": {"@odata.type": "microsoft.graph.recipient"},
  "hasAttachments": true,
  "id": "string (identifier)",
  "importance": "String",
  "inferenceClassification": "String",
  "internetMessageHeaders": [{"@odata.type": "microsoft.graph.internetMessageHeader"}],
  "internetMessageId": "String",
  "isDeliveryReceiptRequested": true,
  "isDraft": true,
  "isRead": true,
  "isReadReceiptRequested": true,
  "lastModifiedDateTime": "String (timestamp)",
  "parentFolderId": "string",
  "receivedDateTime": "String (timestamp)",
  "replyTo": [{"@odata.type": "microsoft.graph.recipient"}],
  "sender": {"@odata.type": "microsoft.graph.recipient"},
  "sentDateTime": "String (timestamp)",
  "subject": "string",
  "toRecipients": [{"@odata.type": "microsoft.graph.recipient"}],
  "uniqueBody": {"@odata.type": "microsoft.graph.itemBody"},
  "webLink": "string",

  "attachments": [{"@odata.type": "microsoft.graph.attachment"}],
  "extensions": [{"@odata.type": "microsoft.graph.extension"}],
  "multiValueExtendedProperties": [{"@odata.type": "microsoft.graph.multiValueLegacyExtendedProperty"}],
  "singleValueExtendedProperties": [{"@odata.type": "microsoft.graph.singleValueLegacyExtendedProperty"}]
}

这不包含有关该项目的完整权限的任何内容。有谁知道如何获得这个?

【问题讨论】:

    标签: microsoft-graph-api exchange-server


    【解决方案1】:

    似乎没有办法通过 Graph API 公开邮箱或文件夹权限。这些可通过 Exchange Online PowerShell 模块获得,例如Get-MailboxFolderPermission.

    【讨论】:

      【解决方案2】:

      您无法获得项目级别权限,因为项目不存储与之关联的 ACL。但是,您可以通过查询文件夹的 PR_NT_SECURITY_DESCRIPTOR (0x0E270102) 来获得文件夹级别的权限。

      我实际上是根据我的旧 REST API 客户端引擎为此编写脚本:Start-MailboxFolderPermissionReport

      如果脚本不够,我可以通过Graph Managed API编写C#方式来完成它

      【讨论】:

      • 希望有一个多平台的方式来做这件事,但还是谢谢
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-11
      • 1970-01-01
      • 2018-02-01
      • 2021-11-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多