Usage
m365 spo list sensitivitylabel remove [options]
Description
Clears a default sensitivity label from a document library
Options
| Option |
Description |
-u, --webUrl <webUrl> |
The URL of the site where the list is located. |
-t, --listTitle [listTitle] |
The title of the library on which to remove the label. Specify either listTitle, listId, or listUrl but not multiple. |
-l, --listId [listId] |
The ID of the library on which to remove the label. Specify either listTitle, listId, or listUrl but not multiple. |
--listUrl [listUrl] |
Server- or web-relative URL of the library on which to remove the label. Specify either listTitle, listId, or listUrl but not multiple. |
-f, --force |
Don't prompt for confirmation. |
Examples
Removes a sensitivity label on a document library based on the list title
m365 spo list sensitivitylabel remove --webUrl 'https://contoso.sharepoint.com' --listTitle 'Shared Documents'
Removes a sensitivity label on a document library based on the list url
m365 spo list sensitivitylabel remove --webUrl 'https://contoso.sharepoint.com' --listUrl '/Shared Documents'
Removes a sensitivity label on a document library based on the list id. Doesn't prompt for confirmation.
m365 spo list sensitivitylabel remove --webUrl 'https://contoso.sharepoint.com' --listId 'b4cfa0d9-b3d7-49ae-a0f0-f14ffdd005f7' --force
Default properties
No response
Additional Info
This can be archieved by doing:
PATCH https://contoso.sharepoint.com/sites/testcomm/_api/web/lists(guid'[List ID]')
or PATCH https://contoso.sharepoint.com/sites/testcomm/_api/web/lists/getByTitle('[List Title]')
or PATCH https://contoso.sharepoint.com/sites/testcomm/_api/web/GetList([List server relative URL])
headers
body
{
"DefaultSensitivityLabelForLibrary": ""
}
on success the api returns a 204 No Content
Usage
m365 spo list sensitivitylabel remove [options]
Description
Clears a default sensitivity label from a document library
Options
-u, --webUrl <webUrl>-t, --listTitle [listTitle]listTitle,listId, orlistUrlbut not multiple.-l, --listId [listId]listTitle,listId, orlistUrlbut not multiple.--listUrl [listUrl]listTitle,listId, orlistUrlbut not multiple.-f, --forceExamples
Removes a sensitivity label on a document library based on the list title
Removes a sensitivity label on a document library based on the list url
Removes a sensitivity label on a document library based on the list id. Doesn't prompt for confirmation.
Default properties
No response
Additional Info
This can be archieved by doing:
PATCH https://contoso.sharepoint.com/sites/testcomm/_api/web/lists(guid'[List ID]')or
PATCH https://contoso.sharepoint.com/sites/testcomm/_api/web/lists/getByTitle('[List Title]')or
PATCH https://contoso.sharepoint.com/sites/testcomm/_api/web/GetList([List server relative URL])headers
body
on success the api returns a 204 No Content