From 7432b7060b5dfec8e1df58dc9e49f2682eb65db2 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Sun, 2 Feb 2025 16:04:33 +0100 Subject: [PATCH 01/11] Aligned Entra group member commands: Deprecated 'groupDisplayName', introduced 'groupName' for consistency. Closes #6546 --- .../docs/cmd/entra/group/group-member-add.mdx | 19 ++- .../docs/cmd/entra/group/group-member-set.mdx | 19 ++- .../commands/group/group-member-add.spec.ts | 66 ++++++++++ .../entra/commands/group/group-member-add.ts | 19 ++- .../commands/group/group-member-set.spec.ts | 124 ++++++++++++++++++ .../entra/commands/group/group-member-set.ts | 19 ++- 6 files changed, 252 insertions(+), 14 deletions(-) diff --git a/docs/docs/cmd/entra/group/group-member-add.mdx b/docs/docs/cmd/entra/group/group-member-add.mdx index 59d17a13ad1..561360e1f7f 100644 --- a/docs/docs/cmd/entra/group/group-member-add.mdx +++ b/docs/docs/cmd/entra/group/group-member-add.mdx @@ -14,10 +14,13 @@ m365 entra group member add [options] ```md definition-list `-i, --groupId [groupId]` -: The ID of the Microsoft Entra group. Specify `groupId` or `groupDisplayName` but not both. +: The ID of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. `-n, --groupDisplayName [groupDisplayName]` -: The display name of the Microsoft Entra group. Specify `groupId` or `groupDisplayName` but not both. +: The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. + +`--groupName [groupName]` +: The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. `--ids [ids]` : Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids` or `userNames` but not both. @@ -39,6 +42,12 @@ Add a single member specified by ID as a member to a group specified by display m365 entra group member add --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member ``` +Add a single member specified by ID as a member to a group specified by group name. + +```sh +m365 entra group member add --groupName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member +``` + Add multiple members specified by ID as members to a group specified by ID. ```sh @@ -51,6 +60,12 @@ Add a single member specified by UPN as an owner to a group specified by display m365 entra group member add --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner ``` +Add a single member specified by UPN as an owner to a group specified by group name. + +```sh +m365 entra group member add --groupName Developers --userNames john.doe@contoso.com --role Owner +``` + Adds multiple members specified by UPN as owners to a group specified by ID. ```sh diff --git a/docs/docs/cmd/entra/group/group-member-set.mdx b/docs/docs/cmd/entra/group/group-member-set.mdx index 51b996c841e..a67c92e4ac7 100644 --- a/docs/docs/cmd/entra/group/group-member-set.mdx +++ b/docs/docs/cmd/entra/group/group-member-set.mdx @@ -14,10 +14,13 @@ m365 entra group member set [options] ```md definition-list `-i, --groupId [groupId]` -: The ID of the Entra ID group. Specify `groupId` or `groupDisplayName` but not both. +: The ID of the Entra ID group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. `-n, --groupDisplayName [groupDisplayName]` -: The display name of the Entra ID group. Specify `groupId` or `groupDisplayName` but not both. +: The display name of the Entra ID group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. + +`--groupName [groupName]` +: The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. `--ids [ids]` : Comma-separated list of user IDs. Specify either `ids` or `userNames` but not both. @@ -39,6 +42,12 @@ Update a single member specified by ID to a member of a group specified by displ m365 entra group member set --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member ``` +Update a single member specified by ID to a member of a group specified by group name + +```sh +m365 entra group member set --groupName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member +``` + Update multiple members specified by ID to members of a group specified by ID ```sh @@ -51,6 +60,12 @@ Update a single member specified by UPN to an owner of a group specified by disp m365 entra group member set --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner ``` +Update a single member specified by UPN to an owner of a group specified by group name + +```sh +m365 entra group member set --groupName Developers --userNames john.doe@contoso.com --role Owner +``` + Update multiple members specified by UPN to owners of a group specified by ID ```sh diff --git a/src/m365/entra/commands/group/group-member-add.spec.ts b/src/m365/entra/commands/group/group-member-add.spec.ts index 2c0d9edc246..3df36d562ae 100644 --- a/src/m365/entra/commands/group/group-member-add.spec.ts +++ b/src/m365/entra/commands/group/group-member-add.spec.ts @@ -109,6 +109,32 @@ describe(commands.GROUP_MEMBER_ADD, () => { assert.strictEqual(actual, true); }); + it(`correctly shows deprecation warning for option 'groupDisplayName'`, async () => { + const chalk = (await import('chalk')).default; + const loggerErrSpy = sinon.spy(logger, 'logToStderr'); + + sinon.stub(entraGroup, 'getGroupIdByDisplayName').resolves(groupId); + sinon.stub(entraUser, 'getUserIdsByUpns').resolves(userIds); + + sinon.stub(request, 'post').callsFake(async opts => { + if (opts.url === 'https://graph.microsoft.com/v1.0/$batch') { + return { + responses: Array(2).fill({ + status: 204, + body: {} + }) + }; + } + + throw 'Invalid request'; + }); + + await command.action(logger, { options: { groupDisplayName: 'IT department', ids: userIds.join(','), role: 'Member', verbose: true } }); + assert(loggerErrSpy.calledWith(chalk.yellow(`Option 'groupDisplayName' is deprecated and will be removed in the next major release.`))); + + sinonUtil.restore(loggerErrSpy); + }); + it('successfully adds users to the group with ids', async () => { const postStub = sinon.stub(request, 'post').callsFake(async opts => { if (opts.url === 'https://graph.microsoft.com/v1.0/$batch') { @@ -224,6 +250,46 @@ describe(commands.GROUP_MEMBER_ADD, () => { ]); }); + it('successfully adds users to the group using groupName and userNames', async () => { + sinon.stub(entraGroup, 'getGroupIdByDisplayName').resolves(groupId); + sinon.stub(entraUser, 'getUserIdsByUpns').resolves(userIds); + + const postStub = sinon.stub(request, 'post').callsFake(async opts => { + if (opts.url === 'https://graph.microsoft.com/v1.0/$batch') { + return { + responses: Array(2).fill({ + status: 204, + body: {} + }) + }; + } + + throw 'Invalid request'; + }); + + await command.action(logger, { options: { groupName: 'Contoso', userNames: userUpns.join(','), role: 'Owner', verbose: true } }); + assert.deepStrictEqual(postStub.lastCall.args[0].data.requests, [ + { + id: 1, + method: 'PATCH', + url: `/groups/${groupId}`, + headers: { 'content-type': 'application/json;odata.metadata=none' }, + body: { + 'owners@odata.bind': userIds.slice(0, 20).map(u => `https://graph.microsoft.com/v1.0/directoryObjects/${u}`) + } + }, + { + id: 21, + method: 'PATCH', + url: `/groups/${groupId}`, + headers: { 'content-type': 'application/json;odata.metadata=none' }, + body: { + 'owners@odata.bind': userIds.slice(20, 40).map(u => `https://graph.microsoft.com/v1.0/directoryObjects/${u}`) + } + } + ]); + }); + it('successfully adds users to the group with names and leading spaces', async () => { sinon.stub(entraGroup, 'getGroupIdByDisplayName').resolves(groupId); sinon.stub(entraUser, 'getUserIdsByUpns').resolves(userIds); diff --git a/src/m365/entra/commands/group/group-member-add.ts b/src/m365/entra/commands/group/group-member-add.ts index 8e515bc077b..384a33eeef2 100644 --- a/src/m365/entra/commands/group/group-member-add.ts +++ b/src/m365/entra/commands/group/group-member-add.ts @@ -14,6 +14,7 @@ interface CommandArgs { interface Options extends GlobalOptions { groupId?: string; groupDisplayName?: string; + groupName?: string; ids?: string; userNames?: string; role: string; @@ -45,6 +46,7 @@ class EntraGroupMemberAddCommand extends GraphCommand { Object.assign(this.telemetryProperties, { groupId: typeof args.options.groupId !== 'undefined', groupDisplayName: typeof args.options.groupDisplayName !== 'undefined', + groupName: typeof args.options.groupName !== 'undefined', ids: typeof args.options.ids !== 'undefined', userNames: typeof args.options.userNames !== 'undefined' }); @@ -59,6 +61,9 @@ class EntraGroupMemberAddCommand extends GraphCommand { { option: '-n, --groupDisplayName [groupDisplayName]' }, + { + option: "--groupName [groupName]" + }, { option: '--ids [ids]' }, @@ -104,19 +109,23 @@ class EntraGroupMemberAddCommand extends GraphCommand { #initOptionSets(): void { this.optionSets.push( - { options: ['groupId', 'groupDisplayName'] }, + { options: ['groupId', 'groupDisplayName', 'groupName'] }, { options: ['ids', 'userNames'] } ); } #initTypes(): void { - this.types.string.push('groupId', 'groupDisplayName', 'ids', 'userNames', 'role'); + this.types.string.push('groupId', 'groupDisplayName', 'groupName', 'ids', 'userNames', 'role'); } public async commandAction(logger: Logger, args: CommandArgs): Promise { try { + if (args.options.groupDisplayName) { + await this.warn(logger, `Option 'groupDisplayName' is deprecated and will be removed in the next major release.`); + } + if (this.verbose) { - await logger.logToStderr(`Adding member(s) ${args.options.ids || args.options.userNames} to group ${args.options.groupId || args.options.groupDisplayName}...`); + await logger.logToStderr(`Adding member(s) ${args.options.ids || args.options.userNames} to group ${args.options.groupId || args.options.groupDisplayName || args.options.groupName}...`); } const groupId = await this.getGroupId(logger, args.options); @@ -169,10 +178,10 @@ class EntraGroupMemberAddCommand extends GraphCommand { } if (this.verbose) { - await logger.logToStderr(`Retrieving ID of group ${options.groupDisplayName}...`); + await logger.logToStderr(`Retrieving ID of group ${options.groupDisplayName || options.groupName}...`); } - return entraGroup.getGroupIdByDisplayName(options.groupDisplayName!); + return entraGroup.getGroupIdByDisplayName(options.groupDisplayName! || options.groupName!); } private async getUserIds(logger: Logger, options: Options): Promise { diff --git a/src/m365/entra/commands/group/group-member-set.spec.ts b/src/m365/entra/commands/group/group-member-set.spec.ts index 9dd8b19b92b..fb1de146b57 100644 --- a/src/m365/entra/commands/group/group-member-set.spec.ts +++ b/src/m365/entra/commands/group/group-member-set.spec.ts @@ -109,6 +109,61 @@ describe(commands.GROUP_MEMBER_SET, () => { assert.strictEqual(actual, true); }); + it(`correctly shows deprecation warning for option 'groupDisplayName'`, async () => { + const chalk = (await import('chalk')).default; + const loggerErrSpy = sinon.spy(logger, 'logToStderr'); + + sinon.stub(entraGroup, 'getGroupIdByDisplayName').resolves(groupId); + sinon.stub(entraUser, 'getUserIdsByUpns').resolves(userIds); + + sinon.stub(request, 'post').callsFake(async opts => { + if (opts.url === 'https://graph.microsoft.com/v1.0/$batch' && + opts.data.requests[0].method === 'PATCH') { + return { + responses: Array(2).fill({ + status: 204, + body: {} + }) + }; + } + + if (opts.url === 'https://graph.microsoft.com/v1.0/$batch' && + opts.data.requests[0].method === 'GET') { + return { + responses: [ + { + id: userIds[0], + status: 200, + body: 1 + }, + { + id: userIds[2], + status: 200, + body: 1 + } + ] + }; + } + + if (opts.url === 'https://graph.microsoft.com/v1.0/$batch' && + opts.data.requests[0].method === 'DELETE') { + return { + responses: Array(2).fill({ + status: 204, + body: {} + }) + }; + } + + throw 'Invalid request'; + }); + + await command.action(logger, { options: { groupDisplayName: 'Contoso', ids: userIds.join(','), role: 'Member', verbose: true } }); + assert(loggerErrSpy.calledWith(chalk.yellow(`Option 'groupDisplayName' is deprecated and will be removed in the next major release.`))); + + sinonUtil.restore(loggerErrSpy); + }); + it('successfully updates roles for users with ids in the group', async () => { const postStub = sinon.stub(request, 'post').callsFake(async opts => { if (opts.url === 'https://graph.microsoft.com/v1.0/$batch' && @@ -311,6 +366,75 @@ describe(commands.GROUP_MEMBER_SET, () => { ]); }); + it('successfully updates roles for users using groupName and userNames', async () => { + sinon.stub(entraGroup, 'getGroupIdByDisplayName').resolves(groupId); + sinon.stub(entraUser, 'getUserIdsByUpns').resolves(userIds); + + const postStub = sinon.stub(request, 'post').callsFake(async opts => { + if (opts.url === 'https://graph.microsoft.com/v1.0/$batch' && + opts.data.requests[0].method === 'PATCH') { + return { + responses: Array(2).fill({ + status: 204, + body: {} + }) + }; + } + + if (opts.url === 'https://graph.microsoft.com/v1.0/$batch' && + opts.data.requests[0].method === 'GET') { + return { + responses: [ + { + id: userIds[0], + status: 200, + body: 1 + }, + { + id: userIds[2], + status: 200, + body: 1 + } + ] + }; + } + + if (opts.url === 'https://graph.microsoft.com/v1.0/$batch' && + opts.data.requests[0].method === 'DELETE') { + return { + responses: Array(2).fill({ + status: 204, + body: {} + }) + }; + } + + throw 'Invalid request'; + }); + + await command.action(logger, { options: { groupName: 'Contoso', userNames: userUpns.join(','), role: 'Owner', verbose: true } }); + assert.deepStrictEqual(postStub.firstCall.args[0].data.requests, [ + { + id: 1, + method: 'PATCH', + url: `/groups/${groupId}`, + headers: { 'content-type': 'application/json;odata.metadata=none' }, + body: { + 'owners@odata.bind': userIds.slice(0, 20).map(u => `https://graph.microsoft.com/v1.0/directoryObjects/${u}`) + } + }, + { + id: 21, + method: 'PATCH', + url: `/groups/${groupId}`, + headers: { 'content-type': 'application/json;odata.metadata=none' }, + body: { + 'owners@odata.bind': userIds.slice(20, 40).map(u => `https://graph.microsoft.com/v1.0/directoryObjects/${u}`) + } + } + ]); + }); + it('successfully updates roles for users with names and leading spaces in the group', async () => { sinon.stub(entraGroup, 'getGroupIdByDisplayName').resolves(groupId); sinon.stub(entraUser, 'getUserIdsByUpns').resolves(userIds); diff --git a/src/m365/entra/commands/group/group-member-set.ts b/src/m365/entra/commands/group/group-member-set.ts index 1e48474e98e..d12ac5e1b3b 100644 --- a/src/m365/entra/commands/group/group-member-set.ts +++ b/src/m365/entra/commands/group/group-member-set.ts @@ -14,6 +14,7 @@ interface CommandArgs { interface Options extends GlobalOptions { groupId?: string; groupDisplayName?: string; + groupName?: string; ids?: string; userNames?: string; role: string; @@ -45,6 +46,7 @@ class EntraGroupMemberSetCommand extends GraphCommand { Object.assign(this.telemetryProperties, { groupId: typeof args.options.groupId !== 'undefined', groupDisplayName: typeof args.options.groupDisplayName !== 'undefined', + groupName: typeof args.options.groupName !== 'undefined', ids: typeof args.options.ids !== 'undefined', userNames: typeof args.options.userNames !== 'undefined' }); @@ -59,6 +61,9 @@ class EntraGroupMemberSetCommand extends GraphCommand { { option: '-n, --groupDisplayName [groupDisplayName]' }, + { + option: "--groupName [groupName]" + }, { option: '--ids [ids]' }, @@ -104,19 +109,23 @@ class EntraGroupMemberSetCommand extends GraphCommand { #initOptionSets(): void { this.optionSets.push( - { options: ['groupId', 'groupDisplayName'] }, + { options: ['groupId', 'groupDisplayName', 'groupName'] }, { options: ['ids', 'userNames'] } ); } #initTypes(): void { - this.types.string.push('groupId', 'groupDisplayName', 'ids', 'userNames', 'role'); + this.types.string.push('groupId', 'groupDisplayName', 'groupName', 'ids', 'userNames', 'role'); } public async commandAction(logger: Logger, args: CommandArgs): Promise { try { + if (args.options.groupDisplayName) { + await this.warn(logger, `Option 'groupDisplayName' is deprecated and will be removed in the next major release.`); + } + if (this.verbose) { - await logger.logToStderr(`Adding member(s) ${args.options.ids || args.options.userNames} to role ${args.options.role} of group ${args.options.groupId || args.options.groupDisplayName}...`); + await logger.logToStderr(`Adding member(s) ${args.options.ids || args.options.userNames} to role ${args.options.role} of group ${args.options.groupId || args.options.groupDisplayName || args.options.groupName}...`); } const groupId = await this.getGroupId(logger, args.options); @@ -140,10 +149,10 @@ class EntraGroupMemberSetCommand extends GraphCommand { } if (this.verbose) { - await logger.logToStderr(`Retrieving ID of group ${options.groupDisplayName}...`); + await logger.logToStderr(`Retrieving ID of group ${options.groupDisplayName || options.groupName}...`); } - return entraGroup.getGroupIdByDisplayName(options.groupDisplayName!); + return entraGroup.getGroupIdByDisplayName(options.groupDisplayName! || options.groupName!); } private async getUserIds(logger: Logger, options: Options): Promise { From 5ea8a6cceb5a9e1f81ca25b8bef020c0689a3852 Mon Sep 17 00:00:00 2001 From: Martin Lingstuyl Date: Wed, 5 Feb 2025 23:20:50 +0100 Subject: [PATCH 02/11] Update docs/docs/cmd/entra/group/group-member-add.mdx --- docs/docs/cmd/entra/group/group-member-add.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/cmd/entra/group/group-member-add.mdx b/docs/docs/cmd/entra/group/group-member-add.mdx index 561360e1f7f..0e22fbedd0f 100644 --- a/docs/docs/cmd/entra/group/group-member-add.mdx +++ b/docs/docs/cmd/entra/group/group-member-add.mdx @@ -14,7 +14,7 @@ m365 entra group member add [options] ```md definition-list `-i, --groupId [groupId]` -: The ID of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. +: The ID of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple. `-n, --groupDisplayName [groupDisplayName]` : The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. From 193f538938df4ce533f23fb681835001b840198e Mon Sep 17 00:00:00 2001 From: Martin Lingstuyl Date: Wed, 5 Feb 2025 23:21:14 +0100 Subject: [PATCH 03/11] Update docs/docs/cmd/entra/group/group-member-add.mdx --- docs/docs/cmd/entra/group/group-member-add.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/cmd/entra/group/group-member-add.mdx b/docs/docs/cmd/entra/group/group-member-add.mdx index 0e22fbedd0f..ff211ec1dfe 100644 --- a/docs/docs/cmd/entra/group/group-member-add.mdx +++ b/docs/docs/cmd/entra/group/group-member-add.mdx @@ -17,7 +17,7 @@ m365 entra group member add [options] : The ID of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple. `-n, --groupDisplayName [groupDisplayName]` -: The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. +: (deprecated. Use option `groupName` instead) The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple. `--groupName [groupName]` : The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. From 6310be750fb31e6594383ba3d50cef281033331f Mon Sep 17 00:00:00 2001 From: Martin Lingstuyl Date: Wed, 5 Feb 2025 23:21:23 +0100 Subject: [PATCH 04/11] Update docs/docs/cmd/entra/group/group-member-add.mdx --- docs/docs/cmd/entra/group/group-member-add.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/cmd/entra/group/group-member-add.mdx b/docs/docs/cmd/entra/group/group-member-add.mdx index ff211ec1dfe..a137f261646 100644 --- a/docs/docs/cmd/entra/group/group-member-add.mdx +++ b/docs/docs/cmd/entra/group/group-member-add.mdx @@ -20,7 +20,7 @@ m365 entra group member add [options] : (deprecated. Use option `groupName` instead) The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple. `--groupName [groupName]` -: The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. +: The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple. `--ids [ids]` : Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids` or `userNames` but not both. From 2cbad6e3fd68c8fba3931312fe4f8bb2129609dd Mon Sep 17 00:00:00 2001 From: Martin Lingstuyl Date: Wed, 5 Feb 2025 23:21:34 +0100 Subject: [PATCH 05/11] Update docs/docs/cmd/entra/group/group-member-set.mdx --- docs/docs/cmd/entra/group/group-member-set.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/cmd/entra/group/group-member-set.mdx b/docs/docs/cmd/entra/group/group-member-set.mdx index a67c92e4ac7..de7b0a0a371 100644 --- a/docs/docs/cmd/entra/group/group-member-set.mdx +++ b/docs/docs/cmd/entra/group/group-member-set.mdx @@ -14,7 +14,7 @@ m365 entra group member set [options] ```md definition-list `-i, --groupId [groupId]` -: The ID of the Entra ID group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. +: The ID of the Entra ID group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple. `-n, --groupDisplayName [groupDisplayName]` : The display name of the Entra ID group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. From 8eeeb53e701d5ef634d7a8a78b78e23516f9fd89 Mon Sep 17 00:00:00 2001 From: Martin Lingstuyl Date: Wed, 5 Feb 2025 23:21:48 +0100 Subject: [PATCH 06/11] Update docs/docs/cmd/entra/group/group-member-set.mdx --- docs/docs/cmd/entra/group/group-member-set.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/cmd/entra/group/group-member-set.mdx b/docs/docs/cmd/entra/group/group-member-set.mdx index de7b0a0a371..e22ce13601a 100644 --- a/docs/docs/cmd/entra/group/group-member-set.mdx +++ b/docs/docs/cmd/entra/group/group-member-set.mdx @@ -17,7 +17,7 @@ m365 entra group member set [options] : The ID of the Entra ID group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple. `-n, --groupDisplayName [groupDisplayName]` -: The display name of the Entra ID group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. +: (deprecated. Use option `groupName` instead) The display name of the Entra ID group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple. `--groupName [groupName]` : The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. From 5fdf2aacf552ebc48071ebeccaa52ba1e314c2b4 Mon Sep 17 00:00:00 2001 From: Martin Lingstuyl Date: Wed, 5 Feb 2025 23:21:55 +0100 Subject: [PATCH 07/11] Update docs/docs/cmd/entra/group/group-member-set.mdx --- docs/docs/cmd/entra/group/group-member-set.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/cmd/entra/group/group-member-set.mdx b/docs/docs/cmd/entra/group/group-member-set.mdx index e22ce13601a..91e26dd8666 100644 --- a/docs/docs/cmd/entra/group/group-member-set.mdx +++ b/docs/docs/cmd/entra/group/group-member-set.mdx @@ -20,7 +20,7 @@ m365 entra group member set [options] : (deprecated. Use option `groupName` instead) The display name of the Entra ID group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple. `--groupName [groupName]` -: The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName`, or `groupName` but not multiple. +: The display name of the Microsoft Entra group. Specify `groupId`, `groupDisplayName` or `groupName` but not multiple. `--ids [ids]` : Comma-separated list of user IDs. Specify either `ids` or `userNames` but not both. From 50b7b6e3c31762048faa0df4382a8d8019427720 Mon Sep 17 00:00:00 2001 From: Martin Lingstuyl Date: Wed, 5 Feb 2025 23:22:03 +0100 Subject: [PATCH 08/11] Update src/m365/entra/commands/group/group-member-set.ts --- src/m365/entra/commands/group/group-member-set.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m365/entra/commands/group/group-member-set.ts b/src/m365/entra/commands/group/group-member-set.ts index d12ac5e1b3b..d41b997ab3c 100644 --- a/src/m365/entra/commands/group/group-member-set.ts +++ b/src/m365/entra/commands/group/group-member-set.ts @@ -59,7 +59,7 @@ class EntraGroupMemberSetCommand extends GraphCommand { option: '-i, --groupId [groupId]' }, { - option: '-n, --groupDisplayName [groupDisplayName]' + option: '--groupDisplayName [groupDisplayName]' }, { option: "--groupName [groupName]" From af8a81676938afa4736266e5bb2046d2e3b76644 Mon Sep 17 00:00:00 2001 From: Martin Lingstuyl Date: Wed, 5 Feb 2025 23:22:12 +0100 Subject: [PATCH 09/11] Update src/m365/entra/commands/group/group-member-set.ts --- src/m365/entra/commands/group/group-member-set.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m365/entra/commands/group/group-member-set.ts b/src/m365/entra/commands/group/group-member-set.ts index d41b997ab3c..35f2d97fddd 100644 --- a/src/m365/entra/commands/group/group-member-set.ts +++ b/src/m365/entra/commands/group/group-member-set.ts @@ -62,7 +62,7 @@ class EntraGroupMemberSetCommand extends GraphCommand { option: '--groupDisplayName [groupDisplayName]' }, { - option: "--groupName [groupName]" + option: '-n, --groupName [groupName]' }, { option: '--ids [ids]' From ade19d8af017d6c274192843945e150f7559b92e Mon Sep 17 00:00:00 2001 From: Martin Lingstuyl Date: Wed, 5 Feb 2025 23:22:19 +0100 Subject: [PATCH 10/11] Update src/m365/entra/commands/group/group-member-add.ts --- src/m365/entra/commands/group/group-member-add.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m365/entra/commands/group/group-member-add.ts b/src/m365/entra/commands/group/group-member-add.ts index 384a33eeef2..f539c72ed8f 100644 --- a/src/m365/entra/commands/group/group-member-add.ts +++ b/src/m365/entra/commands/group/group-member-add.ts @@ -59,7 +59,7 @@ class EntraGroupMemberAddCommand extends GraphCommand { option: '-i, --groupId [groupId]' }, { - option: '-n, --groupDisplayName [groupDisplayName]' + option: '--groupDisplayName [groupDisplayName]' }, { option: "--groupName [groupName]" From 27abdefc422c70f2533bc7f8c0a5d7964fd54602 Mon Sep 17 00:00:00 2001 From: Martin Lingstuyl Date: Wed, 5 Feb 2025 23:22:27 +0100 Subject: [PATCH 11/11] Update src/m365/entra/commands/group/group-member-add.ts --- src/m365/entra/commands/group/group-member-add.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m365/entra/commands/group/group-member-add.ts b/src/m365/entra/commands/group/group-member-add.ts index f539c72ed8f..586bd54e29b 100644 --- a/src/m365/entra/commands/group/group-member-add.ts +++ b/src/m365/entra/commands/group/group-member-add.ts @@ -62,7 +62,7 @@ class EntraGroupMemberAddCommand extends GraphCommand { option: '--groupDisplayName [groupDisplayName]' }, { - option: "--groupName [groupName]" + option: '-n, --groupName [groupName]' }, { option: '--ids [ids]'