編輯

共用方式為


List passiveDns

Namespace: microsoft.graph.security

Note

The Microsoft Graph API for Microsoft Defender Threat Intelligence requires an active Defender Threat Intelligence Portal license and API add-on license for the tenant.

Get a list of passiveDnsRecord resources associated with a host.

This method is a forward DNS lookup that queries the IP address of the specified host using its hostname.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) ThreatIntelligence.Read.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application ThreatIntelligence.Read.All Not available.

HTTP request

GET /security/threatIntelligence/hosts/{hostId}/passiveDns

Optional query parameters

This method supports the $count, $select, $filter, $orderBy, $top, and $skip OData query parameters to help customize the response. For general information, see OData query parameters.

Name Description
$count $count is supported to return a holistic count of the number of passiveDnsRecord objects. $count is supported as a query parameter (?$count=true) or as a path parameter (/$count).
$orderby $orderby supports some properties of the passiveDns resource. For details, see Supported properties with $orderby.
$filter $filter is required in the request URL of this API. The API currently only supports filtering by one field in a call. For details, see Supported properties with $filter.
$select $select is supported to limit the properties returned in this query.
$skip $skip is supported to skip over elements in pages. Combine with $top to perform pagination or use the @odata.nextLink for server-side pagination.
$top $top is supported to limit the number of elements per page. Combine with $skip to perform pagination or use the @odata.nextLink for server-side pagination.

Supported properties with $filter

The following properties can be used for $filter calls:

Property Example
recordType $filter=recordType eq 'A'

Supported properties with $orderby

The following properties can be used for $orderby calls.

Property Example
firstSeenDateTime $orderby=firstSeenDateTime desc
lastSeenDateTime $orderby=lastSeenDateTime desc

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a collection of microsoft.graph.security.passiveDnsRecord objects in the response body.

Examples

Request

The following example shows a request.

GET https://graph.microsoft.com/v1.0/security/threatIntelligence/hosts/contoso.com/passiveDns

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

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

{
  "value": [
    {
      "@odata.type": "#microsoft.graph.security.passiveDnsRecord",
      "id": "Y29udG9zby5jb20kJDIwLjEwMy44NS4zMyQkZmFsc2U=",
      "firstSeenDateTime": "2022-04-18T10:31:12Z",
      "lastSeenDateTime": "2023-03-07T13:19:35Z",
      "collectedDateTime": "2023-03-07T13:59:34.735Z",
      "recordType": "A",
      "parentHost": {
          "id": "contoso.com"
      },
      "artifact": {
          "@odata.type": "#microsoft.graph.security.ipAddress",
          "id": "20.103.85.33"
      }
    }
  ]
}