Get all scan agents

Applies to:

Want to experience Microsoft Defender for Endpoint? Sign up for a free trial.

Want to experience Microsoft Defender Vulnerability Management? Find out how to sign up for a free trial.

Important

Some information in this article relates to a prereleased product which may be substantially modified before it's commercially released. Microsoft makes no warranties, expressed or implied, with respect to the information provided here.

Note

If you are a US Government customer, please use the URIs listed in Microsoft Defender for Endpoint for US Government customers.

Tip

For better performance, you can use server closer to your geo location:

  • us.api.security.microsoft.com
  • eu.api.security.microsoft.com
  • uk.api.security.microsoft.com
  • au.api.security.microsoft.com
  • swa.api.security.microsoft.com
  • ina.api.security.microsoft.com

API description

Retrieves a list of all scan agents.

Limitations

  1. Rate limitations for this API are 100 calls per minute and 1500 calls per hour.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Use Microsoft Defender for Endpoint APIs.

Permission type Permission Permission display name
Application Machine.Read.All Read all scan information.
Delegated (work or school account) Machine.Read.All Read all scan information.

Note

When obtaining a token using user credentials:

  • To view data the user needs to have at least the following role permission: 'ViewData' or 'TvmViewData' (See Create and manage roles for more information)

HTTP request

GET /api/DeviceAuthenticatedScanAgents

Request headers

Name Type Description
Authorization String Bearer {token}. Required.

Request body

Empty

Response

If successful, this method returns 200 - OK response code with a list of authenticated scan agents.

Example

Request example

Here is an example of the request.

https://api-us.securitycenter.microsoft.com/api/DeviceAuthenticatedScanAgents

Response example

Here is an example of the response.

{
    "@odata.context": "https://api-us.securitycenter.microsoft.com/api/$metadata#DeviceAuthenticatedScanAgents",
    "value": [
        {
            "id": "47df41a0c-asad-4fd6d3-bbea-a93dbc0bfcaa_4edd75b2407a5b64d704b4e53d74f15",
            "machineId": "4ejh675b240118fbehiuiy5b64d704b4e53d15",
            "lastSeen": "2022-05-08T12:18:41.538203Z",
            "computerDnsName": "TEST_DOMAIN",
            "AssignedApplicationId": "9E0FA0EB-0A51-4357-9C87-C21BFBE07571",
            "ScannerSoftwareVersion": "7.1.1",
            "LastCommandExecutionTimestamp": "2022-05-08T12:18:41.538203Z",
            "mdeClientVersion": "10.8295.22621.1195"
        },
        {
            "id": "47d41a0c-1dfd-46d3-bbea-a93dbc0bfcaa_eb663a27ae9d032f61bc268oiu4c4b90f77",
            "machineId": "eb663a27ae9d032sdf9dfd79eedf14c4b90f77",
            "lastSeen": "2022-12-19T20:29:04.8242449Z",
            "computerDnsName": "TEST_DOMAIN2",
            "AssignedApplicationId": "9E0FA0EB-0A51-4357-9C87-C21BFBE07571",
            "ScannerSoftwareVersion": "7.1.1",
            "LastCommandExecutionTimestamp": "2022-12-19T20:29:04.8242449Z",
            "mdeClientVersion": "10.8295.22621.1010"
        },
    ]
}

Tip

Do you want to learn more? Engage with the Microsoft Security community in our Tech Community: Microsoft Defender for Endpoint Tech Community.