New command: `spo folder 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 folder roleassignment list [options]
Description
Lists all role assignments from a specific folder
Options
| Option | Description |
|---|---|
-u, --webUrl <webUrl> |
URL of the site where the folder is located. |
--folderUrl [folderUrl] |
The server- or site-relative decoded URL of the folder. Specify either folderUrl or folderId but not both. |
-i, --folderId [folderId] |
The UniqueId (GUID) of the folder. Specify either folderUrl or folderId but not both. |
Examples
List all role assignments of a folder specified by URL
m365 spo folder roleassignment list --webUrl "https://contoso.sharepoint.com/sites/Marketing" --folderUrl "/Branding/Logos"
List all role assignments of a folder specified by ID
m365 spo folder roleassignment list --webUrl "https://contoso.sharepoint.com/sites/Marketing" --folderId "04796e10-cb5f-4aa3-a438-bc06028a9073"
Default properties
- PrincipalId
- Member/Title
- RoledefinitionBindings/Name (comma-separated)
Additional Info
API request
GET https://contoso.sharepoint.com/sites/Marketing/_api/Web/GetFolderByServerRelativePath(decodedUrl='/sites/Marketing/Branding/Logos')/ListItemAllFields/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 by finding existing spo folder roleassignment commands and other list commands in the CLI, then compare their tests and SharePoint API request patterns with the request shown here. Done means the new command accepts either folderUrl or folderId, lists the folder's role assignments, and returns the stated default properties.
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
- 48/100