2019-05-15 14:27:29 -07:00

2.0 KiB

title, description, keywords, search.product, ms.prod, ms.mktglfcycl, ms.sitesec, ms.pagetype, ms.author, author, ms.localizationpriority, manager, audience, ms.collection, ms.topic
title description keywords search.product ms.prod ms.mktglfcycl ms.sitesec ms.pagetype ms.author author ms.localizationpriority manager audience ms.collection ms.topic
Get user information API Retrieve a User entity by key such as user name or domain. apis, graph api, supported apis, get, user, user information eADQiWindows 10XVcnh w10 deploy library security macapara mjcaparas medium dansimp ITPro M365-security-compliance article

Get user information API

Applies to:

Retrieve a User entity by key (user name).

Permissions

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

Permission type Permission Permission display name
Application User.Read.All 'Read all user profiles'

HTTP request

GET /api/users/{id}/

Request headers

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

Request body

Empty

Response

If successful and user exists - 200 OK with user entity in the body. If user does not exist - 404 Not Found.

Example

Request

Here is an example of the request.

[!includeImprove request performance]

GET https://api.securitycenter.windows.com/api/users/user1
Content-type: application/json

Response

Here is an example of the response.

HTTP/1.1 200 OK
Content-type: application/json
{
    "@odata.context": "https://api.securitycenter.windows.com/api/$metadata#Users/$entity",
    "id": "user1",
    "firstSeen": "2018-08-02T00:00:00Z",
    "lastSeen": "2018-08-04T00:00:00Z",
    "mostPrevalentMachineId": null,
    "leastPrevalentMachineId": null,
    "logonTypes": "Network",
    "logOnMachinesCount": 3,
    "isDomainAdmin": false,
    "isOnlyNetworkUser": null
}