4

In custom policy if I wanted to change Authorize & METADATA endpoint from login.microsoftonline.com to tenant.b2clogin.com

What should we use.

I get 404 for the endpoint

Tony Ju
  • 14,891
  • 3
  • 17
  • 31
Harshal Shah
  • 79
  • 2
  • 8
  • You could try this work around. Hope you would get the outline. If you have any more query feel free to ask. Thanks – Md Farid Uddin Kiron Apr 08 '19 at 06:05
  • I believe this is answered here: https://stackoverflow.com/a/63123070/5022951. At least, it answered the same question for me. Apologies if yours is a different problem. – Mat Feb 12 '21 at 16:37

1 Answers1

2

Your Case

I wanted to change Authorize & METADATA endpoint from login.microsoftonline.com to tenant.b2clogin.com

Solution

In your case you need to configure custom URI for your application. To do that please have a look on the following steps

Step to follow

When you set up an identity provider for sign-up and sign-in in your Azure Active Directory (Azure AD) B2C application, you need to specify a redirect URL.

In the past, login.microsoftonline.com was used, now you should be using b2clogin.com.

For Example https://YourTenantName.b2clogin.com

Following settings that might need to change when using b2clogin.com

  1. Set the redirect URLs in your identity provider applications to use b2clogin.com.
  2. Set your Azure AD B2C application to use b2clogin.com for user flow references and token endpoints.
  3. If you are using MSAL, you need to set the ValidateAuthority property to false.
  4. Make sure that you change any Allowed Origins that you have defined in the CORS settings for user-interface customization.

Go to user policy of your b2c app. See the screen shot below:

enter image description here

Click on page layout like below:

enter image description here

Run your custom flow. Take a look below

enter image description here

Note:

You can use both the tenant name and the tenant GUID as follows:

  1. https://your-tenant-name.b2clogin.com/your-tenant-name.onmicrosoft.com (which still refers to onmicrosoft.com)
  2. https://your-tenant-name.b2clogin.com/your-tenant-guid (in which case there is no reference to Microsoft at all)

Remember

You cannot use a custom domain for your Azure Active Directory B2C tenant, e.g.

https://your-tenant-name.b2clogin.com/your-custom-domain-name would not work.

If you feel any problem during implementation you could refer official document here

For your more queries you can also refer here

Hoping this will help to figure out the way around. Thank you.

Md Farid Uddin Kiron
  • 16,817
  • 3
  • 17
  • 43