How to use Google Account As Identity Provider With Azure Active Directory B2C?

Hello Readers,


Welcome to the 4th blog of  "Azure active directory b2c series". In the first 3 parts we have seen how to create Azure AD B2C Tenant step by step , how to use it with .net core application and what are the different "Identity Providers In Azure Active Directory B2C". If you haven't checked yet then you can check Part-1 - Part-2-Part-3. So, Today we will look into "Google Identity Providers" that azure active directory b2c provides.

You might have question why we need the identity provider?

So, 
Azure Active Directory B2C (Azure AD B2C) is a powerful cloud identity management service that enables seamless user sign-up, sign-in, and profile management in applications. By integrating Google accounts as a sign-in option, you can enhance the user experience and streamline the authentication process. In this blog post, we will look into the steps to set up sign-up and sign-in with a Google account using Azure AD B2C, ensuring a smooth integration of identity providers.

To understand this identity provider integration I will cover it in 3 different parts.

  1. Creating a Google API Project and Configuring Credentials
  2. Configuring Azure Active Directory B2C     
  3. Testing the Sign-Up and Sign-In Flow  


In this blog we will look into how to configure google account.

To begin, let's create a Google API project and configure the necessary credentials:

Visit the Google Cloud Console login into your google account and create a new project.

Now select APIs&Services from sidebar and select OAuth consent screen same as below images.

Google Api And Services


OAuth consent screen in google console cloude


Next you will see below screen where we need to select "Edit App" option from top.

Google console application edit the project

Now We need to enter details about our application like applicationName, support email, 
app domain details, authorization domain. follow steps from below images

Google console project add application name support email and required details

Application domain information needs to be added to work with return url

Kindly add "https://jwt.ms"  this url instead localhost url.
Azure active directory authorize domain url needs to be added

Add developer contact email.

Now save this changes and we are done with set up of the application to get relevant information during the sign-in process.

Next we need to create OAuth 2.0 credentials. So, select "Credential" from the sidebar and click on "Create Credentials" and select "OAuth Client Id".
Google console credential menu

Create Credentials OAuth Client Id for Google console application and azure active directory b2c tenant



Next select "Web Application" from applicationType dropdown. Provide name in "Name" field and Specify the authorized JavaScript origins and redirect URIs, including the Azure AD B2C URLs

Web Application from applicationType dropdown to make the web application for azure active directory b2c

Add Name of your oAuth client application and url of azure active directory b2c tenant
Now we are ready to add google as identity provider for our azure active directory b2c tenant.


In additional information you can see your clientId and client secret for the google application.


Copy ClientId and Client Secret as we need it later in azure portal.

So, Here we have completed part-1where we have seen how to configure google project so we can use google as identity provider in azure portal active directory b2c.

In Next blog we will see how to configure google account in azure portal as identity provider.

So, Stay tuned guys see you in next blog. Also, provide your valuable feedback if you find this blog useful or need anything to be changed.


See you in next blog ðŸ˜€.

Comments

Popular posts from this blog

Integrate Azure AD B2C With .Net Core Application

The Ultimate Guide to Userflow in Azure AD B2C: Boosting User Experience and Security

Next-Level Identity Management: How to Integrate Azure AD B2C with Google Accounts - Part2