Skip to content

spo permission management part 2 🔐 (add --withPermissions option) #3972

@Adam-it

Description

@Adam-it

💡 What is the Idea

Currently CLI got a lot of commands which allow to create/remove/break/reset permissions on many different levels created with this issue #3540.
The idea now is to add commands which will allow to check/list permissions on different levels (items/files/folders/lists/webs).

💪 What to do ?

As agreed in the discussion we should extend the following commands with a --withPermissions option. When it is used it should 'attach' the permission response to the original get response

the spo list get command already has this implemented so we may use this as an example.

📚 If it's possible?

in order to achieve it we may use the following REST API endpoint

list permissions on item level (file, folder)

.../_api/web/lists/getbytitle('test1')/items(1)/RoleAssignments?$expand=Member,RoleDefinitionBindings

list permissions on list level

.../_api/web/lists/getbytitle('test1')/RoleAssignments?$expand=Member,RoleDefinitionBindings

list permissions on web level

.../_api/web/RoleAssignments?$expand=Member,RoleDefinitionBindings

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions