diff --git a/src/m365/entra/commands/enterpriseapp/enterpriseapp-add.spec.ts b/src/m365/entra/commands/enterpriseapp/enterpriseapp-add.spec.ts index 009558afa22..119d1bd07a3 100644 --- a/src/m365/entra/commands/enterpriseapp/enterpriseapp-add.spec.ts +++ b/src/m365/entra/commands/enterpriseapp/enterpriseapp-add.spec.ts @@ -68,6 +68,11 @@ describe(commands.ENTERPRISEAPP_ADD, () => { assert.notStrictEqual(command.description, null); }); + it('defines correct alias', () => { + const alias = command.alias(); + assert.deepStrictEqual(alias, [commands.SP_ADD]); + }); + it('fails validation if neither the id, displayName, nor objectId option specified', async () => { sinon.stub(cli, 'getSettingWithDefaultValue').callsFake((settingName, defaultValue) => { if (settingName === settingsNames.prompt) { diff --git a/src/m365/entra/commands/enterpriseapp/enterpriseapp-add.ts b/src/m365/entra/commands/enterpriseapp/enterpriseapp-add.ts index f732ea1a64a..db3f5bf5138 100644 --- a/src/m365/entra/commands/enterpriseapp/enterpriseapp-add.ts +++ b/src/m365/entra/commands/enterpriseapp/enterpriseapp-add.ts @@ -26,6 +26,10 @@ class EntraEnterpriseAppAddCommand extends GraphCommand { return 'Creates an enterprise application (or service principal) for a registered Entra app'; } + public alias(): string[] | undefined { + return [commands.SP_ADD]; + } + constructor() { super(); diff --git a/src/m365/entra/commands/enterpriseapp/enterpriseapp-get.spec.ts b/src/m365/entra/commands/enterpriseapp/enterpriseapp-get.spec.ts index a95f812c6d5..5b083ef7415 100644 --- a/src/m365/entra/commands/enterpriseapp/enterpriseapp-get.spec.ts +++ b/src/m365/entra/commands/enterpriseapp/enterpriseapp-get.spec.ts @@ -82,6 +82,11 @@ describe(commands.ENTERPRISEAPP_GET, () => { assert.notStrictEqual(command.description, null); }); + it('defines correct alias', () => { + const alias = command.alias(); + assert.deepStrictEqual(alias, [commands.SP_GET]); + }); + it('retrieves information about the specified enterprise application using its display name', async () => { sinon.stub(request, 'get').callsFake(async (opts) => { if ((opts.url as string).indexOf(`/v1.0/servicePrincipals?$filter=displayName eq `) > -1) { diff --git a/src/m365/entra/commands/enterpriseapp/enterpriseapp-get.ts b/src/m365/entra/commands/enterpriseapp/enterpriseapp-get.ts index 0fe94b35b4a..48798595b9a 100644 --- a/src/m365/entra/commands/enterpriseapp/enterpriseapp-get.ts +++ b/src/m365/entra/commands/enterpriseapp/enterpriseapp-get.ts @@ -26,6 +26,10 @@ class EntraEnterpriseAppGetCommand extends GraphCommand { return 'Gets information about an Enterprise Application'; } + public alias(): string[] | undefined { + return [commands.SP_GET]; + } + constructor() { super(); diff --git a/src/m365/entra/commands/enterpriseapp/enterpriseapp-list.spec.ts b/src/m365/entra/commands/enterpriseapp/enterpriseapp-list.spec.ts index 5e9355420f9..ea073a19515 100644 --- a/src/m365/entra/commands/enterpriseapp/enterpriseapp-list.spec.ts +++ b/src/m365/entra/commands/enterpriseapp/enterpriseapp-list.spec.ts @@ -134,6 +134,11 @@ describe(commands.ENTERPRISEAPP_LIST, () => { assert.notStrictEqual(command.description, null); }); + it('defines correct alias', () => { + const alias = command.alias(); + assert.deepStrictEqual(alias, [commands.SP_LIST]); + }); + it('defines correct properties for the default output', () => { assert.deepStrictEqual(command.defaultProperties(), ['appId', 'displayName', 'tag']); }); diff --git a/src/m365/entra/commands/enterpriseapp/enterpriseapp-list.ts b/src/m365/entra/commands/enterpriseapp/enterpriseapp-list.ts index 903518dfe78..3995679b25f 100644 --- a/src/m365/entra/commands/enterpriseapp/enterpriseapp-list.ts +++ b/src/m365/entra/commands/enterpriseapp/enterpriseapp-list.ts @@ -26,6 +26,10 @@ class EntraEnterpriseAppListCommand extends GraphCommand { return 'Lists the enterprise applications (or service principals) in Entra ID'; } + public alias(): string[] | undefined { + return [commands.SP_LIST]; + } + constructor() { super();