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 isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--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
- JSON
- Text
- CSV
[
{
"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": []
}
]
id displayName isInUse
------------------------------------ -------------- --------
dc67203a-6cca-4066-b501-903401308f98 Some label true
id,displayName,isInUse
dc67203a-6cca-4066-b501-903401308f98,Some label,true