Skip to main content

purview retentionlabel list

Get a list of retention labels

Usage

m365 purview retentionlabel list [options]

Options

-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

Get a list of retention labels

m365 purview retentionlabel list

Response

[
{
"displayName": "Some label",
"descriptionForAdmins": "",
"descriptionForUsers": null,
"isInUse": true,
"retentionTrigger": "dateCreated",
"behaviorDuringRetentionPeriod": "retainAsRecord",
"actionAfterRetentionPeriod": "delete",
"createdDateTime": "2022-11-03T10:28:15Z",
"lastModifiedDateTime": "2022-11-03T10:28:15Z",
"labelToBeApplied": null,
"defaultRecordBehavior": "startLocked",
"id": "dc67203a-6cca-4066-b501-903401308f98",
"retentionDuration": {
"days": 365
},
"createdBy": {
"user": {
"id": "b52ffd35-d6fe-4b70-86d8-91cc01d76333",
"displayName": null
}
},
"lastModifiedBy": {
"user": {
"id": "b52ffd35-d6fe-4b70-86d8-91cc01d76333",
"displayName": null
}
},
"dispositionReviewStages": []
}
]
CTRL + M