pnp/cli-microsoft365

New command: `spo listitem roleassignment list`

Offen

#6.189 geöffnet am 27.07.2024

 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (399 Forks)auto 404
good first issuehelp wantedkeep-opennew feature

Repository-Metriken

Stars
 (1.390 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Usage

m365 spo listitem roleassignment list [options]

Description

Lists all role assignments from a specific list item

Options

Option Description
-u, --webUrl <webUrl> URL of the site where the list item is located.
-i, --listId [listId] ID of the list. Specify either listId, listTitle, or listUrl but not multiple.
-t, --listTitle [listTitle] Title of the list. Specify either listId, listTitle, or listUrl but not multiple.
--listUrl [listUrl] Relative URL of the list. Specify either listId, listTitle, or listUrl but not multiple.
--listItemId <listItemId> ID of the list item to remove the role from.

Examples

Lists all role assignments of a list item in a list specified by title

m365 spo listitem roleassignment list --webUrl "https://contoso.sharepoint.com/sites/Marketing" --listTitle "Branding" --listItemId 125

Lists all role assignments of a list item in a list specified by ID

m365 spo listitem roleassignment list --webUrl "https://contoso.sharepoint.com/sites/Marketing" --listId a2baa9d6-ef21-4208-8753-342893c4f0d9 --listItemId 125

Lists all role assignments of a list item in a list specified by URL

m365 spo listitem roleassignment list --webUrl "https://contoso.sharepoint.com/sites/Marketing" --listUrl "/Branding" --listItemId 125

Default properties

  • PrincipalId
  • Member/Title
  • RoledefinitionBindings/Name (comma-separated)

Additional Info

API request

GET https://contoso.sharepoint.com/sites/Marketing/_api/Web/Lists/GetByTitle('Testlib')/Items(125)/RoleAssignments?$expand=Member,RoleDefinitionBindings&$select=*,Member,RoleDefinitionBindings

Contributor Guide