Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: entra group user add #5471

Closed
Tracked by #5432
milanholemans opened this issue Sep 8, 2023 · 0 comments
Closed
Tracked by #5432

New command: entra group user add #5471

milanholemans opened this issue Sep 8, 2023 · 0 comments

Comments

@milanholemans
Copy link
Contributor

milanholemans commented Sep 8, 2023

Usage

m365 entra group user add [options]

Description

Adds a user to a Microsoft Entra ID group

Options

Option Description
-i, --groupId [groupId] The ID of the Entra ID group. Specify groupId or groupDisplayName but not both.
-n, --groupDisplayName [groupDisplayName] The display name of the Entra ID group. Specify groupId or groupDisplayName but not both.
--ids [ids] Entra ID IDs of users. You can also pass a comma-separated list of IDs. Specify either ids or userNames but not both.
--userNames [userNames] The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either ids or userNames but not both.
-r, --role <role> The role to be assigned to the new users. Valid values: Owner, Member.

Examples

Add a single user specified by ID as a member to a group specified by display name

m365 entra group user add --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member

Add multiple users specified by ID as members to a group specified by ID

m365 entra group user add --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --ids "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member

Add a single user specified by UPN as an owner to a group specified by display name

m365 entra group user add --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner

Adds multiple users specified by UPN as owners to a group specified by ID

m365 entra group user add --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userNames "john.doe@contoso.com,adele.vance@contoso.com" --role Owner

Default properties

No response

Additional Info

Let's use Graph batching to add the users in batch.

@milanholemans milanholemans added new feature needs peer review Needs second pair of eyes to review the spec or PR labels Sep 8, 2023
@Jwaegebaert Jwaegebaert added help wanted and removed needs peer review Needs second pair of eyes to review the spec or PR labels Sep 12, 2023
@Adam-it Adam-it added the hacktoberfest Issue perfect for hacktoberfest label Sep 25, 2023
@milanholemans milanholemans removed the hacktoberfest Issue perfect for hacktoberfest label Nov 6, 2023
@milanholemans milanholemans changed the title New command: aad group user add New command: entra group user add Dec 31, 2023
@milanholemans milanholemans self-assigned this Jan 5, 2024
milanholemans added a commit to milanholemans/cli-microsoft365 that referenced this issue Jan 22, 2024
milanholemans added a commit to milanholemans/cli-microsoft365 that referenced this issue Jan 23, 2024
milanholemans added a commit to milanholemans/cli-microsoft365 that referenced this issue Feb 9, 2024
@waldekmastykarz waldekmastykarz added this to the v7.5 milestone Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants