Skip to main content

purview retentioneventtype add

Create a retention event type

Usage

m365 purview retentioneventtype add [options]

Options

-n, --displayName <displayName>

The display name of the event type.

-d, --description [description]

A description for the event type.

-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 options.

--query [query]

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

-o, --output [output]

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

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

warning

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

Examples

Create a retention event type Contract Expiry.

m365 purview retentioneventtype add --displayName 'Contract Expiry' --description 'A retention event type to start a retention period based on the date that a contract expired.'

Response

{
{
"displayName": "Contract Expiry",
"description": "A retention event type to start a retention period based on the date that a contract expired.",
"createdDateTime": "2023-01-31T20:33:33Z",
"lastModifiedDateTime": "2023-01-31T20:33:33Z",
"id": "f15d2493-7ad2-4185-a3f6-9580542490a0",
"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 about event-based retention here

CTRL + M