Creating Audit Items
You can create an audit item, that is, select a user or group for audit. Veeam Backup for Microsoft 365 will send audit notifications for operations performed by the specified users and users of the specified groups.
Request
POST https://<hostname>:4443/v6/Organizations/{organizationId}/AuditItems |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
The following parameter must be specified in the URL of the request:
Parameter | Type | Description |
---|---|---|
organizationId | string | Specifies the identification number of the Microsoft 365 organization. For more information on how to get this parameter, see Getting Organizations. |
Request Body
The request body must contain the following properties:
Property | Type | Description |
---|---|---|
type | string | Specifies the type of the audit item. The following types are available:
|
user | Specifies the user for which Veeam Backup for Microsoft 365 will send audit notifications. | |
group | Specifies the group for which Veeam Backup for Microsoft 365 will send audit notifications. |
For example:
Request Body: [ { "type": "User", "user": { "id": "a54b55d8-4a07-4755-9889-5001ded697f000000000-0000-0000-0000-000000000000", "displayName": "admin", "name": "admin@abc.onmicrosoft.com", "type": "User", "locationType": "Cloud" } } ] |
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns a response code 201 Created.
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
---|---|
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |
Response Body
None.
Examples
Example 1
The example shows how to add a user to the list of audit items.
Request: POST https://abc.tech.local:4443/v6/Organizations/967093a9-cf39-43e5-84cb-646ccd4993df/AuditItems
Request Header: Authorization: Bearer <Access-Token>
Request Body: [ { "type": "User", "user": { "id": "a54b55d8-4a07-4755-9889-5001ded697f000000000-0000-0000-0000-000000000000", "displayName": "admin", "name": "admin@abc.onmicrosoft.com", "type": "User", "locationType": "Cloud" } } ]
Response: 201 Created |
Example 2
The example shows how to add a group to the list of audit items.
Request: POST https://abc.tech.local:4443/v6/Organizations/967093a9-cf39-43e5-84cb-646ccd4993df/AuditItems
Request Header: Authorization: Bearer <Access-Token>
Request Body: [ { "type": "Group", "group": { "id": "0eb7e684-b568-4487-8fe5-1c92cd13e91500000000-0000-0000-0000-000000000000", "displayName": "Group2", "name": "group2@abc.onmicrosoft.com", "managedBy": "administrator", "site": "https://abc.sharepoint.com/sites/group2", "type": "Office365", "locationType": "Cloud" } } ]
Response: 201 Created |