Azure-docs: wrong documentation

Created on 10 Jun 2020  Â·  9Comments  Â·  Source: MicrosoftDocs/azure-docs

I tried to refresh a token but alway I've got an invalid_grant error. After some timme of investigation I found out (with help of an stack overflow post) that I have to put the policy as query parameter into the request. That means:

this URL is wrong https://<tenant-name>.b2clogin.com/<tenant-name>.onmicrosoft.com/B2C_1_ROPC_Auth/oauth2/v2.0/token

this URL ist fine and works https://login.microsoftonline.com/<tenant-name>.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1_ROPC_Auth

It would be great to change it in every documentation regarding this topic to save time for next developers. Every documentation means, I found a lot of samples and tutorials with this wrong type of URL.


Document Details

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

B2subsvc Pri2 active-directorsvc cxp triaged

All 9 comments

@jfellien Thank you for your query. We will investigate and make sure the documentation is rectified.

maybe the Stack Overflow post may help to understand what I tried to do.

Thank you for the link @jfellien . We will update the thread after review.

@jfellien The url mentioned in the document is correct. In fact, the support for login.microsoftonline.com in Azure AD B2C is planned for retirement on 04 December 2020. Refer to https://docs.microsoft.com/en-us/azure/active-directory-b2c/b2clogin for more details.

Redeeming the refresh token to get new token is supported with b2clogin.com. Please refer to the screenshot below:

image

Thank you for your investigation.

Bad for me, because then I have to find out how to use "grant_type=password" in my app without login.microsoftonline.com

@jfellien You can refer to below screenshot where I have requested the tokens with grant_type=password.

image

Great, you are my hero

Is works like a charm.

But you've added the policy as query too. Here https://docs.microsoft.com/en-us/azure/active-directory-b2c/signin-appauth-ios?tabs=app-reg-ga the policy ist documented as part of URL. Does it matter?

@jfellIien It works the same way if we pass the policy name as part of the URL or as a parameter. Below is the screenshot where policy name is not passed as parameter but as part of the URL:

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AronT-TLV picture AronT-TLV  Â·  3Comments

JamesDLD picture JamesDLD  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments