diff --git a/docs/docs/cmd/spo/user/user-ensure.mdx b/docs/docs/cmd/spo/user/user-ensure.mdx index bae121da4d9..76e90a249c3 100644 --- a/docs/docs/cmd/spo/user/user-ensure.mdx +++ b/docs/docs/cmd/spo/user/user-ensure.mdx @@ -21,9 +21,6 @@ m365 spo user ensure [options] `--entraId [--entraId]` : Id of the user in Entra. Specify either `aadId`, `entraId`, `userName`, `loginName`, `entraGroupId` or `entraGroupName`. -`--aadId [--aadId]` -: (deprecated. Use `entraId` instead) Id of the user in Microsoft Entra. Specify either `aadId`, `entraId`, `userName`, `loginName`, `entraGroupId` or `entraGroupName`. - `--userName [userName]` : User's UPN (user principal name, e.g. john@contoso.com). Specify either `aadId`, `entraId`, `userName`, `loginName`, `entraGroupId` or `entraGroupName`. diff --git a/src/m365/spo/commands/user/user-ensure.spec.ts b/src/m365/spo/commands/user/user-ensure.spec.ts index 57f729cd603..8e0f69cea63 100644 --- a/src/m365/spo/commands/user/user-ensure.spec.ts +++ b/src/m365/spo/commands/user/user-ensure.spec.ts @@ -398,4 +398,4 @@ describe(commands.USER_ENSURE, () => { const actual = await command.validate({ options: { webUrl: validWebUrl, entraGroupId: validEntraGroupId } }, commandInfo); assert.strictEqual(actual, true); }); -}); +}); \ No newline at end of file diff --git a/src/m365/spo/commands/user/user-ensure.ts b/src/m365/spo/commands/user/user-ensure.ts index 833eaf6b79d..eecb55991ac 100644 --- a/src/m365/spo/commands/user/user-ensure.ts +++ b/src/m365/spo/commands/user/user-ensure.ts @@ -106,7 +106,7 @@ class SpoUserEnsureCommand extends SpoCommand { #initOptionSets(): void { this.optionSets.push({ - options: ['entraId', 'aadId', 'userName', 'loginName', 'entraGroupId', 'entraGroupName'], + options: ['entraId', 'userName', 'loginName', 'entraGroupId', 'entraGroupName'], runsWhen: (args) => args.options.entraId || args.options.aadId || args.options.userName || args.options.loginName || args.options.entraGroupId || args.options.entraGroupName }); }