Skip to content

Enhancement: allow for add group members by site user Id #4097

@martinlingstuyl

Description

@martinlingstuyl

In our spo group user add command, we allow for adding users by upn or email. Aside from that we could also allow people to add users by Id. I mean the site user id a user has on a SharePoint site.

We could add the following option to allow for this

Option Description
--userId [userId] The user Id of the user to add as a member. (Id of the site user, for example: 14) If multiple users need to be added, the Id's have to be comma separated. Specify either userName, email or userId.

Remarks

Update: We've renamed the commands to spo group member in #4087.

Examples

Add a user as group member by site user id

m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userId 14

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions