If the AAD app for use with the CLI is configured incorrectly, the CLI will fail the login with an exception but without any information regarding what went wrong exactly:
(node:21486) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'value' of undefined
at /Users/me/office365-cli/dist/Auth.js:149:66
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:21486) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:21486) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Instead, the CLI should relay the error message from the AAD and fail with a non-zero exit code:
AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.
If the AAD app for use with the CLI is configured incorrectly, the CLI will fail the login with an exception but without any information regarding what went wrong exactly:
Instead, the CLI should relay the error message from the AAD and fail with a non-zero exit code: