reportRoot: getEmailAppUsageUserDetailreportRoot: getEmailAppUsageUserDetail

命名空间:microsoft.graphNamespace: microsoft.graph

获取用户在不同电子邮件应用中执行的活动的详细信息。Get details about which activities users performed on the various email apps.

注意: 若要详细了解不同的报表视图和名称,请参阅 Microsoft 365 报表-电子邮件应用程序使用Note: For details about different report views and names, see Microsoft 365 reports - Email apps usage.


要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) Reports.Read.AllReports.Read.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用Application Reports.Read.AllReports.Read.All

注意:若要获得委派权限以允许应用代表用户读取服务使用情况报告,租户管理员必须事先为用户分配适当的 Azure AD 受限管理员角色。Note: For delegated permissions to allow apps to read service usage reports on behalf of a user, the tenant administrator must have assigned the user the appropriate Azure AD limited administrator role. 有关更多详细信息,请参阅授权 API 读取 Microsoft 365 使用情况报告For more details, see Authorization for APIs to read Microsoft 365 usage reports.

HTTP 请求HTTP request

GET /reports/getEmailAppUsageUserDetail(period='{period_value}')
GET /reports/getEmailAppUsageUserDetail(date={date_value})

函数参数Function parameters

在请求 URL 中,提供以下任一参数的有效值。In the request URL, provide one of the following parameters with a valid value.

参数Parameter 类型Type 说明Description
periodperiod stringstring 指定在多长时间内聚合报表。Specifies the length of time over which the report is aggregated. 受支持的 {period_value} 值为:D7、D30、D90 和 D180。The supported values for {period_value} are: D7, D30, D90, and D180. 这些值采用格式 Dn,其中 n 表示在多少天内聚合报表。These values follow the format Dn where n represents the number of days over which the report is aggregated.
datedate DateDate 指定要查看用户在哪个日期执行的任何活动。Specifies the date for which you would like to view the users who performed any activity. {date_value} 必须采用格式 YYYY-MM-DD。{date_value} must have a format of YYYY-MM-DD. 因为此报表的有效期仅为过去 30 天,所以 {date_value} 应为这个范围内的日期。As this report is only available for the past 30 days, {date_value} should be a date from that range.

注意: 需要在 URL 中设置 period 或 date。Note: You need to set either period or date in the URL.

请求头Request headers

名称Name 说明Description
AuthorizationAuthorization 持有者{令牌}。必需。Bearer {token}. Required.
If-None-MatchIf-None-Match 如果包含此请求头,且提供的 eTag 与文件中的当前标记一致,返回的是 304 Not Modified 响应代码。If this request header is included and the eTag provided matches the current tag on the file, a 304 Not Modified response code is returned. 可选。Optional.


如果成功,此方法返回 302 Found 响应,以重定向到报表的预先验证的下载 URL。If successful, this method returns a 302 Found response that redirects to a preauthenticated download URL for the report. 可以在响应的 Location 头中找到此 URL。That URL can be found in the Location header in the response.

预先验证的下载 URL 的有效时间很短(几分钟),不需要 Authorization 头。Preauthenticated download URLs are only valid for a short period of time (a few minutes) and do not require an Authorization header.

CSV 文件包含下面的列标题。The CSV file has the following headers for columns.

  • 报表刷新日期Report Refresh Date
  • 用户主体名称User Principal Name
  • 显示名称Display Name
  • 已删除Is Deleted
  • 删除日期Deleted Date
  • 上次活动日期Last Activity Date
  • Mail for MacMail For Mac
  • Outlook for MacOutlook For Mac
  • Outlook for WindowsOutlook For Windows
  • Outlook for MobileOutlook For Mobile
  • 适用于移动设备的其他应用Other For Mobile
  • Outlook for WebOutlook For Web
  • POP3 应用POP3 App
  • IMAP4 应用IMAP4 App
  • SMTP 应用SMTP App
  • 报表周期Report Period



下面展示了示例请求。The following is an example of the request.



下面展示了示例响应。The following is an example of the response.

HTTP/1.1 302 Found
Content-Type: text/plain

执行 302 重定向,下载的 CSV 文件将采用以下架构。Follow the 302 redirection and the CSV file that downloads will have the following schema.

HTTP/1.1 200 OK
Content-Type: application/octet-stream

Report Refresh Date,User Principal Name,Display Name,Is Deleted,Deleted Date,Last Activity Date,Mail For Mac,Outlook For Mac,Outlook For Windows,Outlook For Mobile,Other For Mobile,Outlook For Web,POP3 App,IMAP4 App,SMTP App,Report Period