Skip to content

Bug report: weird error when providing wrong values for login #6334

@milanholemans

Description

@milanholemans

Priority

(Low) Something is a little off

Description

I tried to log in using a new connection and got the error message below:

image

As you can see the error is really vague, not telling anything, and Chili 🌶️is saying "undefined".
I noticed that I forgot to specify the --tenant option since the app registration is not multi-tenant.
I noticed that you get the same behavior when you are providing a clientId that doesn't exist.

Steps to reproduce

Use m365 login --appId b61be999-91c2-415b-a9ec-d34e57124548 (the app ID doesn't exist).

Expected results

A clear and obvious message to the user.

Actual results

Chili saying "undefined" and a vague error

Diagnostics

No response

CLI for Microsoft 365 version

v9.0.0

nodejs version

v18.18.2

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

No response

Additional Info

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions