New command: `spo listitem roleassignment list`
Open
Nobody has claimed this yet.
good first issue
help wanted
keep-open
new feature
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 413
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 21
Description
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the proposed spo listitem roleassignment list usage and the SharePoint REST API request in the issue. Implement the documented options and output fields, then verify the three list selectors and the example command behavior against the stated API response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100