Azure B2C Api integration

Arthur Gharibyan 21 Reputation points
2022-06-20T21:08:29.917+00:00

Hi I would like to know if is there a way to use Azure AD b2c with the api approach.
My main goal is to have independent,customizable form on my application but to use AD B2C authentication via api.

https://github.com/Azure-Samples/active-directory-b2c-javascript-nodejs-webapi#running-the-sample

Found link above, wanted to check, am I on the right path with this issue, or there is a much better way?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,639 questions
0 comments No comments
{count} votes

Accepted answer
  1. 2022-06-21T01:00:01.73+00:00

    Hello @Arthur Gharibyan , you can protect both your Web App and Web Api with Azure AD B2C.

    The referenced sample demonstrates how to:

    • Protect your Web Api with Azure AD B2C
    • Obtain an id token and access token from your SPA to gain access to your Api resources.

    The recommended approach involves authenticating interactively trough Azure AD B2C Sign in forms (User Journeys/User Flows/Custom Policies) to obtain the required tokens. Alternatively, but less recommended, you can replace Azure AD B2C Signing journeys with your own using the ROPC flow.

    Let us know if this answer was helpful to you or if you need additional assistance. If it was helpful, please remember to accept it so that others in the community with similar questions can more easily find a solution.

    0 comments No comments

0 additional answers

Sort by: Most helpful