Azure-docs: Does not login

Created on 4 May 2019  Â·  11Comments  Â·  Source: MicrosoftDocs/azure-docs

Following this tutorial and have gone through it multiple times to make sure everything is set right.

Upon login with a user (one who is registered with my tenant), the login popup goes away but then comes back with no changes to the parent page. I have't touched the code from github and I am seeing no errors in the console.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

B2subsvc Pri2 active-directorsvc assigned-to-author doc-bug triaged

All 11 comments

Digging into the code, this tutorial assumes one has setup the API and needed scopes. If you follow this tutorial straight through, top to bottom, it gives the above behavior.

@aszalacinski Thank you for the detailed feedback. We are actively investigating and will have the content owner make an update as appropriate.

Hi @aszalacinski ,

Thanks for your valuable feedback! Is this related to the other issue you created where you said that you managed to get it to work by using an older version of MSAL, or are you still stuck on the login issue?

It is not. It's based on how the Tutorial section is setup. If you follow the tutorial from "top to bottom" the code sample references an API that you don't setup until the next tutorial, protecting an API. If you leave the code as is, you get the experience I mentioned in the original comment.

I have found solutions to my code obstacles by digging into the msal library and accompanying sample code however this tutorial page in the docs may cause some confusion. Thanks for getting back to me!

Thank you, @aszalacinski

I am assigning this to the content author, @davidmu1 .

Which is the API setup tutorial that you are referring to? Do you think it would be enough to include a note in the document that this is a prerequisite?

@MarileeTurscak-MSFT: Please assign this item to @mmacy who is now supporting Azure AD B2C.

@MarileeTurscak-MSFT: Please assign this item to @mmacy who is now supporting Azure AD B2C.

Not sure why this is marked as closed, still having the same issue. I followed this "from top-to-bottom" and I'm still having an issue with the "ServerError: AADB2C90205: This application does not have sufficient permissions against this web resource to perform the operation."
Seems like I'm having the same issue where this code is asking for an access token to something I haven't built yet

@KepanoEgg It seems you might have missed the Error: insufficient permissions section of the article, which states:


Error: insufficient permissions

After you sign in, the app displays an insufficient permissions error - this is expected:

ServerError: AADB2C90205: This application does not have sufficient permissions against this web resource to perform the operation.

You receive this error because you're attempting to access a resource from the demo directory, but your access token is valid only for your Azure AD directory. The API call is therefore unauthorized.

Continue with the next tutorial in the series (see Next steps) to create a protected web API for your directory.


Admittedly not the best experience for a tutorial, however. I'll start a discussion internally about updating the sample and tutorials to improve the flow so that errors like this aren't thrown at the end of the tutorial.

You are correct, I did miss that section, but I also agree that it's not ideal for a tutorial.

@mmacy So the next step has me set up an API on my B2C tenant as well, so the token still won't work, because it's not on my AD tenant. Did I miss a step there?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrdfuse picture mrdfuse  Â·  3Comments

jebeld17 picture jebeld17  Â·  3Comments

behnam89 picture behnam89  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments

monteledwards picture monteledwards  Â·  3Comments