获取 networkAccessTraffic

命名空间:microsoft.graph.networkaccess

重要

Microsoft Graph /beta 版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。

检索 networkAccessTraffic 对象的属性和关系。

此 API 可用于以下国家级云部署

全局服务 美国政府 L4 美国政府 L5 (DOD) 由世纪互联运营的中国

权限

要调用此 API,需要以下权限之一。 若要了解详细信息,包括如何选择权限的信息,请参阅权限

权限类型 最低特权权限 更高特权权限
委派(工作或学校帐户) NetworkAccess-Reports.Read.All NetworkAccess.ReadWrite.All
委派(个人 Microsoft 帐户) 不支持。 不支持。
应用程序 NetworkAccess-Reports.Read.All NetworkAccess.ReadWrite.All

HTTP 请求

GET /networkAccess/logs/traffic/{transactionId}

可选的查询参数

此方法支持 $select OData 查询参数来帮助自定义响应。 若要了解一般信息,请参阅 OData 查询参数

请求标头

名称 说明
Authorization 持有者 {token}。 必填。

请求正文

请勿提供此方法的请求正文。

响应

如果成功,此方法在 200 OK 响应正文中返回响应代码和 networkAccessTraffic 对象。

示例

请求

请求示例如下所示。

GET https://graph.microsoft.com/beta/networkAccess/logs/traffic/5062f456-9d9e-477b-b788-b7aa6b5d402b

响应

下面展示了示例响应。

注意:为了提高可读性,可能缩短了此处显示的响应对象。

HTTP/1.1 200 OK
Content-type: application/json

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#networkAccess/logs/traffic/$entity",
  "transactionId": "5062f456-9d9e-477b-b788-b7aa6b5d402b",
  "createdDateTime": "2025-04-02T15:30:45Z",
  "tenantId": "5c3b997a-7ef9-4b2a-a63b-0271df6ace3b",
  "connectionId": "6d3c2e8f-9a1b-4c7d-8e5f-0231df6ace1a",
  "sessionId": "7f2d1b9e-8c0a-5d6e-9f4e-1342ef7bdf2c",
  "trafficType": "internet",
  "deviceCategory": "client",
  "destinationIp": "203.0.113.5",
  "destinationPort": 443,
  "destinationFQDN": "example.com",
  "destinationUrl": "https://example.com/resources/document.pdf",
  "sourceIp": "192.168.1.100",
  "sourcePort": 54321,
  "deviceOperatingSystem": "Windows 11",
  "deviceOperatingSystemVersion": "22H2",
  "agentVersion": "1.0.123.45",
  "deviceId": "4c8b9a7d-6e5f-3c2d-1b0a-9f8e7d6c5b4a",
  "userId": "2a3b4c5d-6e7f-8g9h-0i1j-2k3l4m5n6o7p",
  "userPrincipalName": "user@contoso.com",
  "transportProtocol": "tcp",
  "networkProtocol": "tcp",
  "action": "allow",
  "policyRuleId": "3d4e5f6g-7h8i-9j0k-1l2m-3n4o5p6q7r8s",
  "policyId": "9a8b7c6d-5e4f-3g2h-1i0j-9k8l7m6n5o4p",
  "sentBytes": 1024,
  "receivedBytes": 8192,
  "destinationWebCategory": {
    "displayName": "Business",
    "name": "business",
    "group": "Productivity"
  },
  "filteringProfileId": "5f6g7h8i-9j0k-1l2m-3n4o-5p6q7r8s9t0u",
  "filteringProfileName": "Standard Security Profile",
  "policyName": "Internet Traffic Policy",
  "policyRuleName": "Allow Business Websites",
  "initiatingProcessName": "browser.exe",
  "resourceTenantId": "5c3b997a-7ef9-4b2a-a63b-0271df6ace3b",
  "description": "Standard internet traffic",
  "httpMethod": "get",
  "responseCode": 200,
  "operationStatus": "success",
  "popProcessingRegion": "westus"
}