Cli-microsoft365: Enhancement: Handle forbidden response when performing authentication

Created on 5 Sep 2019  路  6Comments  路  Source: pnp/cli-microsoft365

When during the authentication process a 403 HTTP Status code is returned (=forbidden). It should be handled in such a way that the user is presented with a useful error message.
For example:

You are not authorized to perform the required service calls. Use option --debug for more information about which request failed.

This will prevent errors occurring further down the line which may lead to confusion.

See issue #1088 for an example

bug work in progress

All 6 comments

@stijnbrouwers how can I repro it? Even if I create an AAD with nothing but the User.Read permission, I can still successfully call MS Graph and retrieve root site URL.

Hi Waldek, tbh I haven't tried reproducing it yet.
I based this ticket on the findings in the related ticket #1088 .
I'll try reproducing it one of these days.
I'll keep you posted

Cool! Thank you. It would be very helpful to have repro steps for this 馃憤

@waldekmastykarz
I did a quick check and was able to reproduce.
However, you don't need look to long into it, you can just assign the ticket to me if you'd like (?)...

Here are the steps to reproduce:

Awesome! I appreciate your help with digging into this and helping out with working on a fix. All yours. Thank you!

@waldekmastykarz
No problem, happy to help!

Was this page helpful?
0 / 5 - 0 ratings