Events API

This page provides a reference of the available operations in the Events API. Events are recorded for security-relevant activities on endpoints and in the portal, for example when a user is added to the local administrators group, a file is blocked, or a PIN code is issued.

All operations must be prefixed with the correct datacenter URL for your tenant. All requests must be authenticated via an API key.

The following operations are available:

For a list of all event types, see Event codes.

Get events

Returns an array of events, in ascending order of their ID.

To retrieve new events incrementally, store the highest ID you have retrieved. In the next call, pass this ID plus one as startid.

Request

GET {datacenter}/events

Response
200 - OK - Success response

The operation returns an array of JSON objects. Each object corresponds to one event.

Examples

Get event

Returns the event with the specified ID.

Request

GET {datacenter}/events/{id}

Response
200 - OK - Success response

The operation returns the event with the specified ID as a JSON object.

500 - Internal Server Error - Unknown ID

There is no event with the specified ID, or the event does not match the query parameters. The response contains the message "Unknown id".

Example

Get computer events

Returns the events for the specified computer.

Request

GET {datacenter}/computers/{computer}/events

Response

200 - OK - Success response

The operation returns an array of JSON objects. Each object corresponds to one event.

Example

Get user events

Returns the events for the specified user.

NOTE The user is matched against the userAccount and userName fields of the event. For events triggered from the portal, userName is the portal user who triggered the action. The result can therefore contain events that this user triggered for other accounts, for example issued Break Glass accounts.
Request

GET {datacenter}/users/{user}/events

Response

200 - OK - Success response

The operation returns an array of JSON objects. Each object corresponds to one event.

Example

Event codes

The following table lists the event codes. Use the code in the eventCode field to identify the type of an event, or pass it as the code query parameter to filter events.

Code Description

1

User added to local admins group

2

User downgraded from administrator to user

3

Group removed from local administrators group

5

Audited administrator logged on

6

Unaudited administrator logged on

8

Support assist initiated

10

Password changed for local user

11

Local user disabled

12

Local user enabled

13

Local user created

14

Local user deleted

20

Policy registry key changed

21

Policy registry key added

30

Uninstall attempted

31

Uninstalled by PIN code

32

PIN code uninstall attempted unsuccessfully

40

Admin By Request Workstation installed

41

Admin By Request Workstation uninstalled

42

Admin By Request Server installed

43

Admin By Request Server uninstalled

50

Diagnostics submitted

60

User restored to local administrators group

61

Group restored to local administrators group

70

Break Glass Account created

71

Break Glass Account removed

72

Break Glass Account logged on

73

Clock tampering using Break Glass account

80

Azure Device Administrator restored

81

Azure Company Administrator restored

90

Admin Session denied by policy

91

Clock tampering during Admin Session

92

Execution of file blocked by policy

93

Execution of file blocked due to detected malware

94

Execution of file blocked due to suspected malware

95

Admin Session PIN code used

97

Application block PIN code used

98

Elevated application block PIN code used

100

Application block PIN 2 issued

101

Uninstall PIN issued

102

Break Glass Account issued

103

Admin Session PIN 2 issued

110

Local administrator account revoke issued

111

Local administrator group revoke issued

112

Local administrator account revoke cancelled

113

Local administrator group revoke cancelled

114

Local administrator account restore issued

115

Local administrator group restore issued

116

Local administrator account restore cancelled

117

Local administrator group restore cancelled

120

Device owner set

121

Device ownership released

122

Device owner set by administrator

123

Admin Session denied by lack of ownership

124

Execution of file blocked by lack of ownership

130

Admin Session denied by lack of Intune compliance

131

Execution of file blocked by lack of Intune compliance

140

Remote desktop account revoke issued

141

Remote desktop group revoke issued

142

Remote desktop account revoke cancelled

143

Remote desktop group revoke cancelled

144

Remote desktop account restore issued

145

Remote desktop group restore issued

146

Remote desktop account restore cancelled

147

Remote desktop group restore cancelled

150

User removed from remote desktop users

151

Group removed from remote desktop users

152

User restored to remote desktop users

153

Group restored to remote desktop users

160

Local administrator account addition issued

161

Local administrator group addition issued

162

Local administrator account addition cancelled

163

Local administrator group addition cancelled

170

Remote desktop account addition issued

171

Remote desktop group addition issued

172

Remote desktop account addition cancelled

173

Remote desktop group addition cancelled

180

Rotating admin account created

181

Rotating admin account removed

182

Rotating admin account logged on

220

Remote kill issued

222

Admin Session attempted in blackout period

223

Remote kill executed