Skip to main content

purview retentionevent get

Get a retention event

Usage

m365 purview retentionevent get [options]

Options

-i, --id <id>

The Id of the retention event.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is full.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Examples

Get a retention event by id

m365 purview retentionevent get --id c37d695e-d581-4ae9-82a0-9364eba4291e

Remarks

caution

This command is based on an API that is currently in preview and is subject to change once the API reached general availability.

caution

This command currently only supports delegated permissions.

Response

{
"displayName": "Contract xyz expired",
"description": "The retention period for documents related to Contract xyz started because the contract expired.",
"eventTriggerDateTime": "2023-02-01T09:16:37Z",
"lastStatusUpdateDateTime": "2023-02-01T09:21:15Z",
"createdDateTime": "2023-02-01T09:17:40Z",
"lastModifiedDateTime": "2023-02-01T09:17:40Z",
"id": "c37d695e-d581-4ae9-82a0-9364eba4291e",
"eventQueries": [
{
"queryType": "files",
"query": "1234"
},
{
"queryType": "messages",
"query": "Terminate"
}
],
"eventStatus": {
"error": null,
"status": "success"
},
"eventPropagationResults": [
{
"serviceName": "SharePoint",
"location": null,
"status": "none",
"statusInformation": null
}
],
"createdBy": {
"user": {
"id": null,
"displayName": "John Doe"
}
},
"lastModifiedBy": {
"user": {
"id": null,
"displayName": "John Doe"
}
}
}

More information

This command is part of a series of commands that have to do with event-based retention. Event-based retention is about starting a retention period when a specific event occurs, instead of the moment a document was labeled or created.

Read more on event-based retention here