spo web retentionlabel list
Get a list of retention labels that are available on a site.
Usage
m365 spo web retentionlabel list [options]
Options
-u, --webUrl <webUrl>
URL of the site.
-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.
Examples
Get a list of retention labels for the Sales site
m365 spo web retentionlabel list --webUrl 'https://contoso.sharepoint.com/sites/sales'
Response
- JSON
- Text
- CSV
- Markdown
[
{
"AcceptMessagesOnlyFromSendersOrMembers": false,
"AccessType": null,
"AllowAccessFromUnmanagedDevice": null,
"AutoDelete": true,
"BlockDelete": true,
"BlockEdit": false,
"ComplianceFlags": 1,
"ContainsSiteLabel": false,
"DisplayName": "",
"EncryptionRMSTemplateId": null,
"HasRetentionAction": true,
"IsEventTag": false,
"MultiStageReviewerEmail": null,
"NextStageComplianceTag": null,
"Notes": null,
"RequireSenderAuthenticationEnabled": false,
"ReviewerEmail": null,
"SharingCapabilities": null,
"SuperLock": false,
"TagDuration": 2555,
"TagId": "def61080-111c-4aea-b72f-5b60e516e36c",
"TagName": "Some label",
"TagRetentionBasedOn": "CreationAgeInDays",
"UnlockedAsDefault": false
}
]
TagId TagName
------------------------------------ --------------
def61080-111c-4aea-b72f-5b60e516e36c Some label
AcceptMessagesOnlyFromSendersOrMembers,AutoDelete,BlockDelete,BlockEdit,ComplianceFlags,ContainsSiteLabel,DisplayName,HasRetentionAction,IsEventTag,RequireSenderAuthenticationEnabled,SuperLock,TagDuration,TagId,TagName,TagRetentionBasedOn,UnlockedAsDefault
,1,1,,1,,,1,,,,2555,def61080-111c-4aea-b72f-5b60e516e36c,Some label,CreationAgeInDays,
# spo web retentionlabel list --webUrl "https://contoso.sharepoint.com/sites/sales"
Date: 4/11/2023
Property | Value
---------|-------
AcceptMessagesOnlyFromSendersOrMembers | false
AutoDelete | true
BlockDelete | true
BlockEdit | false
ComplianceFlags | 1
ContainsSiteLabel | false
DisplayName |
HasRetentionAction | true
IsEventTag | false
RequireSenderAuthenticationEnabled | false
SuperLock | false
TagDuration | 2555
TagId | def61080-111c-4aea-b72f-5b60e516e36c
TagName | Some Label
TagRetentionBasedOn | CreationAgeInDays
UnlockedAsDefault | false