title | description | ms.service | ms.author | author | ms.localizationpriority | manager | audience | ms.collection | ms.topic | ms.subservice | ms.custom | search.appverid | ms.date | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get alert related user information |
Learn how to use the Get alert-related user information API to retrieve the user related to a specific alert in Microsoft Defender for Endpoint. |
defender-endpoint |
deniseb |
denisebmsft |
medium |
deniseb |
ITPro |
|
reference |
reference |
api |
met150 |
12/18/2020 |
[!INCLUDE Microsoft Defender XDR rebranding]
Applies to:
- Microsoft Defender for Endpoint Plan 1
- Microsoft Defender for Endpoint Plan 2
- Microsoft Defender XDR
Want to experience Microsoft Defender for Endpoint? Sign up for a free trial.
[!includeMicrosoft Defender for Endpoint API URIs for US Government]
[!includeImprove request performance]
Retrieves the User related to a specific alert.
- You can query on alerts last updated according to your configured retention period.
- Rate limitations for this API are 100 calls per minute and 1500 calls per hour.
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 | User.Read.All | 'Read user profiles' |
Delegated (work or school account) | User.Read.All | 'Read user profiles' |
Note
When obtaining a token using user credentials:
- The user needs to have at least the following role permission: 'View Data' (See Create and manage roles for more information)
- The user needs to have access to the device associated with the alert, based on device group settings (See Create and manage device groups for more information)
Device group creation is supported in Defender for Endpoint Plan 1 and Plan 2.
GET /api/alerts/{id}/user
Name | Type | Description |
---|---|---|
Authorization | String | Bearer {token}. Required. |
Empty
If successful and alert and a user exists - 200 OK with user in the body. If alert or user not found - 404 Not Found.
Here's an example of the request.
GET https://api.securitycenter.microsoft.com/api/alerts/636688558380765161_2136280442/user
Here is an example of the response.
{
"@odata.context": "https://api.securitycenter.microsoft.com/api/$metadata#Users/$entity",
"id": "contoso\\user1",
"accountName": "user1",
"accountDomain": "contoso",
"accountSid": "S-1-5-21-72051607-1745760036-109187956-93922",
"firstSeen": "2019-12-08T06:33:39Z",
"lastSeen": "2020-01-05T06:58:34Z",
"mostPrevalentMachineId": "0111b647235c26159bec3e5eb6c8c3a0cc3ab766",
"leastPrevalentMachineId": "0111b647235c26159bec3e5eb6c8c3a0cc3ab766",
"logonTypes": "Network",
"logOnMachinesCount": 1,
"isDomainAdmin": false,
"isOnlyNetworkUser": false
}