Skip to content

Bug report: m365 login doesn't accept short option for secret #4858

@nicodecleyre

Description

@nicodecleyre

Priority

(Low) Something is a little off

Description

When using the short option for secret, you get an error message 'Error: 'GUID,secret' is not a valid authentication type'. This is because in the code there is no short option defined for the secret option:

{
option: '--secret [secret]'
},

While in the docs it states that a short option is possible

`-s, --secret [secret]`
: Client Secret of the Azure AD application to use for authentication. Required when `authType` is set to `secret`.

Either we add the short option for secret in the code or we remove the short option in the docs

Steps to reproduce

Execute m365 login --appId [your app id] -s [your secret] --tenant [your tenant id] --authType secret

Expected results

that the command executes with the short options for secret

Actual results

'Error: 'GUID,secret' is not a valid authentication type'.

Diagnostics

No response

CLI for Microsoft 365 version

6.8.0

nodejs version

18.12.1

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

No response

Additional Info

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions