good first issuehelp wantedkeep-opennew feature
Repository metrics
- Stars
- (1,390 stars)
- PR merge metrics
- (PR metrics pending)
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