pnp/cli-microsoft365

New command: `spo folder roleassignment list`

Open

#6,190 创建于 2024年7月27日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)TypeScript (399 fork)auto 404
good first issuehelp wantedkeep-opennew feature

仓库指标

Star
 (1,390 star)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南