azure-ad-b2c

Need guidance for configuring OIDC in B2C, to allow 3rd party to use my B2C as an IdP (new to B2C and Auth)


I have an Angular SPA application with a .NET Core WebAPI, both registered in B2C and using UserFlows. All works perfectly.

Now, we are working with a 3rd party "partner" web app that does not use B2C. We want to use each other as alternative IdPs. We plan to use OIDC.

For example (App A is me, App B is partner):

Login Screens

Login Flow

I'm relatively new to B2C (and auth in general), so I'm trying to understand how to configure this in B2C. Read a lot of articles, and watched some YouTube videos, but still not 100% clear.

I believe I need to do this:

  1. Register App B in B2C
  1. Add a new OIDC Provider in B2C

Is this correct?

I'm also unclear about a few other things:

I'd appreciate any guidance to help me move forward in the right direction.

Thanks!


Solution

  • On B2C, create an external OIDC provider (This is for A to B).

    You can add the external IDP to an existing user flow or create a new one.

    For B to connect via OIDC, you need an app. registration on B2C and then you supply the client ID, secret etc. to B. (This is for B to A).

    B2C will have scope "User.Read" by default. Add "openid" as a scope.

    For A to B, B2C will create a "shadow" account for the user. This is of type "signInType":"federated".

    For B to A, you need an existing local account in A. This is of type "signInType": "emailAddress".