How to integrate Azure AD B2C into a java app using Open ID Connect?

Katrina Smith 20 Reputation points

I'm new to Azure B2C and I'm integrating Azure AD B2C into a spring boot application. The app is a Web app that functions as a resource server and web application in one. The tenant is already created and the app is already registered. I'd like to use Open ID Connect with the application, but there seems to be some confusion over whether I need to set up a new Open ID Connect Provider for Azure B2C. Can someone tell me if I need to create a new Identity Provider for Azure B2C in order to use Open ID Connect? Or does the local account identity provider already serve that function?

Azure Spring Apps
Azure Spring Apps
An Azure platform as a service for running Spring Boot applications at cloud scale. Previously known as Azure Spring Cloud.
109 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,394 questions
0 comments No comments
{count} votes

Accepted answer
  1. Babafemi Bulugbe 1,635 Reputation points

    Hello Katrina Smith,

    Thank you for posting this in the Microsoft Q&A Community.

    From my understanding, you would like to know if the local account identity in Azure AD B2C provides the capabilities of OpenID.

    Please be informed that the local account identity provider in Azure AD B2C is primarily used for username/password-based authentication. It allows users to sign up and sign in using their local credentials (email and password). It provides identity as a service to your application as it uses Open ID Connect for authentication. Follow this link to get more information

    User's image

    You can also configure a custom OIDC identity provider. Follow this link to see the step-by-step guide on how to set up a generic OpenID Connect provider.

    Let me know if further assistance is needed.


1 additional answer

Sort by: Most helpful
  1. Shweta Mathur 27,216 Reputation points Microsoft Employee

    Hi @Katrina Smith ,

    Thanks for reaching out.

    As Babafemi Bulugbe mentioned local account identity provider uses Open ID Connect for authentication. You won't require to add addition IDP in your existing application if you want your users to authenticate using username/password.

    You can refer below document which provide all the steps to integrate spring application with Azure AD B2C.

    Reference -

    Hope this will help.



    Please remember to "Accept Answer" if answer helped you.