Share via

Azure B2C flow via REST API

József Mikus 1 Reputation point
2022-09-29T09:34:33.24+00:00

Hi,

Is there any way to implement B2C "flow" via REST API?

I need the following processes:

  • Registration
  • Login
  • MFA token validation
  • Authorize Token
  • Refresh Token
  • Logout
  • Forget Password

Thank you

Community Center | Not monitored
0 comments No comments

1 answer

Sort by: Most helpful
  1. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,551 Reputation points Moderator
    2022-09-30T05:00:10.45+00:00

    Hello @József Mikus and thanks for reaching out. Azure AD B2C user flows are mainly interactive, however you can create a REST API to support the following operations:

    1. Registration: You can create a user with social and local account identities. Local account is straights forward, but social accounts will require claims, or better yet a full JWT token issued by the social IdP to validate and use for outputting claims to be persisted. For an example take a look to the Facebook ClaimsProvider.
    2. Login: Limited support (local accounts only) trough the ROPC flow. Social accounts must go trough a User Flow.
    3. MFA token validation: create a custom claim type that stores MFA result and validate it in your API.
    4. Authorize Token: trough claims validations.
    5. Refresh Token: Request an access token using the offline_access scope
    6. Logout: You can create an endpoint (E.g. /logout) that sends a sign-out request.
    7. Forget Password: Limited support (local accounts only) trough user: changePassword and Update the passwordProfile of a user to reset their password.

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.