spo list retentionlabel get
Gets the default retention label set on the specified list or library.
Usage
m365 spo list retentionlabel get [options]
Options
-u, --webUrl <webUrl>
URL of the site where the list to get the label from is located.
-l, --listId [listId]
ID of the list to get the label from. Specify either
listId
,listTitle
, orlistUrl
but not multiple.-t, --listTitle [listTitle]
Title of the list to get the label from. Specify either
listId
,listTitle
, orlistUrl
but not multiple.--listUrl [listUrl]
Server- or site-relative URL of the list. Specify either
listId
,listTitle
, orlistUrl
but not multiple.
-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
Gets retention label set on the list with specified title located in the specified site.
m365 spo list retentionlabel get --listTitle ContosoList --webUrl https://contoso.sharepoint.com/sites/project-x
Gets retention label set on the list with specified id located in the specified site.
m365 spo list retentionlabel get --listId cc27a922-8224-4296-90a5-ebbc54da2e85 --webUrl https://contoso.sharepoint.com/sites/project-x
Gets retention label set on the list with specified server relative url located in the specified site.
m365 spo list retentionlabel get --listUrl 'sites/project-x/Documents' --webUrl https://contoso.sharepoint.com/sites/project-x
Gets retention label set on the list with specified site-relative URL located in the specified site.
m365 spo list retentionlabel get --listUrl 'Shared Documents' --webUrl https://contoso.sharepoint.com/sites/project-x
Response
- JSON
- Text
- CSV
- Markdown
{
"AcceptMessagesOnlyFromSendersOrMembers": false,
"AccessType": null,
"AllowAccessFromUnmanagedDevice": null,
"AutoDelete": false,
"BlockDelete": false,
"BlockEdit": false,
"ContainsSiteLabel": false,
"DisplayName": "Label A",
"EncryptionRMSTemplateId": null,
"HasRetentionAction": false,
"IsEventTag": false,
"Notes": null,
"RequireSenderAuthenticationEnabled": false,
"ReviewerEmail": null,
"SharingCapabilities": null,
"SuperLock": false,
"TagDuration": 0,
"TagId": "4d535433-2a7b-40b0-9dad-8f0f8f3b3841",
"TagName": "Sensitive",
"TagRetentionBasedOn": null
}
AcceptMessagesOnlyFromSendersOrMembers: false
AccessType : null
AllowAccessFromUnmanagedDevice : null
AutoDelete : false
BlockDelete : false
BlockEdit : false
ContainsSiteLabel : false
DisplayName : Label A
EncryptionRMSTemplateId : null
HasRetentionAction : false
IsEventTag : false
Notes : null
RequireSenderAuthenticationEnabled : false
ReviewerEmail : null
SharingCapabilities : null
SuperLock : false
TagDuration : 0
TagId : 4d535433-2a7b-40b0-9dad-8f0f8f3b3841
TagName : Sensitive
TagRetentionBasedOn : null
AcceptMessagesOnlyFromSendersOrMembers,AccessType,AllowAccessFromUnmanagedDevice,AutoDelete,BlockDelete,BlockEdit,ContainsSiteLabel,DisplayName,EncryptionRMSTemplateId,HasRetentionAction,IsEventTag,Notes,RequireSenderAuthenticationEnabled,ReviewerEmail,SharingCapabilities,SuperLock,TagDuration,TagId,TagName,TagRetentionBasedOn
false,,,false,false,false,false,Label A,,false,false,,false,,,false,0,4d535433-2a7b-40b0-9dad-8f0f8f3b3841,Sensitive,
# spo list retentionlabel get --listUrl "Shared Documents" --webUrl https://contoso.sharepoint.com/sites/project-x
Date: 2/20/2023
## Label A (4d535433-2a7b-40b0-9dad-8f0f8f3b3841)
Property | Value
---------|-------
AcceptMessagesOnlyFromSendersOrMembers | false
AccessType | null
AllowAccessFromUnmanagedDevice | null
AutoDelete | false
BlockDelete | false
BlockEdit | false
ContainsSiteLabel | false
DisplayName | Label A
EncryptionRMSTemplateId | null
HasRetentionAction | false
IsEventTag | false
Notes | null
RequireSenderAuthenticationEnabled | false
ReviewerEmail | null
SharingCapabilities | null
SuperLock | false
TagDuration | 0
TagId | 4d535433-2a7b-40b0-9dad-8f0f8f3b3841
TagName | Sensitive
TagRetentionBasedOn | null