Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .devproxy/api-specs/sharepoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,90 @@ paths:
responses:
200:
description: OK
/_api/web/lists(guid'{listId}'):
patch:
parameters:
- name: listId
in: path
required: true
description: list GUID
schema:
type: string
example: "b4cfa0d9-b3d7-49ae-a0f0-f14ffdd005f7"
requestBody:
required: true
content:
application/json:
example:
DefaultSensitivityLabelForLibrary: ""
security:
- delegated:
- AllSites.Write
- AllSites.Manage
- AllSites.FullControl
- application:
- Sites.ReadWrite.All
- Sites.Manage.All
- Sites.FullControl.All
responses:
204:
description: No Content
/_api/web/lists/getByTitle('{listTitle}'):
patch:
parameters:
- name: listTitle
in: path
required: true
description: list title
schema:
type: string
example: "Shared Documents"
requestBody:
required: true
content:
application/json:
example:
DefaultSensitivityLabelForLibrary: ""
security:
- delegated:
- AllSites.Write
- AllSites.Manage
- AllSites.FullControl
- application:
- Sites.ReadWrite.All
- Sites.Manage.All
- Sites.FullControl.All
responses:
204:
description: No Content
/_api/web/GetList('{listServerRelativeUrl}'):
patch:
parameters:
- name: listServerRelativeUrl
in: path
required: true
description: Server-relative URL of the list
schema:
type: string
example: "/Shared Documents"
requestBody:
required: true
content:
application/json:
example:
DefaultSensitivityLabelForLibrary: ""
security:
- delegated:
- AllSites.Write
- AllSites.Manage
- AllSites.FullControl
- application:
- Sites.ReadWrite.All
- Sites.Manage.All
- Sites.FullControl.All
responses:
204:
description: No Content
/_api/web/webs:
get:
security:
Expand Down
77 changes: 77 additions & 0 deletions docs/docs/cmd/spo/list/list-sensitivitylabel-remove.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import Global from '../../_global.mdx';
import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';

# spo list sensitivitylabel remove

Clears a default sensitivity label from a document library

## Usage

```sh
m365 spo list sensitivitylabel remove [options]
```

## Options

```md definition-list
`-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.
```

<Global />

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|------------|----------------|
| SharePoint | AllSites.Write |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|------------|--------------------|
| SharePoint | Sites.ReadWrite.All |

</TabItem>
</Tabs>

## Examples

Removes a sensitivity label from a document library based on the list title.

```sh
m365 spo list sensitivitylabel remove --webUrl 'https://contoso.sharepoint.com' --listTitle 'Shared Documents'
```

Removes a sensitivity label from a document library based on the list url.

```sh
m365 spo list sensitivitylabel remove --webUrl 'https://contoso.sharepoint.com' --listUrl '/Shared Documents'
```

Removes a sensitivity label from a document library based on the list id without prompting for confirmation.

```sh
m365 spo list sensitivitylabel remove --webUrl 'https://contoso.sharepoint.com' --listId 'b4cfa0d9-b3d7-49ae-a0f0-f14ffdd005f7' --force
```

## Response

The command won't return a response on success.
5 changes: 5 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3199,6 +3199,11 @@ const sidebars: SidebarsConfig = {
label: 'list sensitivitylabel ensure',
id: 'cmd/spo/list/list-sensitivitylabel-ensure'
},
{
type: 'doc',
label: 'list sensitivitylabel remove',
id: 'cmd/spo/list/list-sensitivitylabel-remove'
},
{
type: 'doc',
label: 'list sitescript get',
Expand Down
1 change: 1 addition & 0 deletions src/m365/spo/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export default {
LIST_ROLEINHERITANCE_BREAK: `${prefix} list roleinheritance break`,
LIST_ROLEINHERITANCE_RESET: `${prefix} list roleinheritance reset`,
LIST_SENSITIVITYLABEL_ENSURE: `${prefix} list sensitivitylabel ensure`,
LIST_SENSITIVITYLABEL_REMOVE: `${prefix} list sensitivitylabel remove`,
LIST_SET: `${prefix} list set`,
LIST_SITESCRIPT_GET: `${prefix} list sitescript get`,
LIST_VIEW_ADD: `${prefix} list view add`,
Expand Down
Loading