Why Be Excited about Azure AD B2C?

Creating a tenant, configuring “Sign Up and Sign In” user flow, and digging into the JWT token.

Image for post
Image for post
Photo by Irina_kukuts on Pixabay

Why Azure Active Directory B2C?

Which Social IDPs Are Supported?

Create an Azure AD B2C Tenant

Image for post
Image for post
Edited screenshot of “Create new B2C Tenant or Link to existing Tenant” on Azure portal
Image for post
Image for post
Edited screenshot of “Tenant Configuration” on Azure portal
Image for post
Image for post
Edited screenshot of “Tenant creation was successful.” on Azure portal

Link the Tenant to Your Subscription

Image for post
Image for post
Edited screenshot of “Link Tenant to Your Subscription” on Azure portal

Switch between Tenants

Image for post
Image for post
Edited screenshot of “Switch Directory” on Azure portal

An Alternative Way to Navigate to Your Tenant

Image for post
Image for post
Edited screenshot of “Navigate to Tenant via All Resources” on Azure portal

Register Your Application

Image for post
Image for post
Edited screenshot of “Register an application” on Azure portal

Configure Authentication

Image for post
Image for post
Edited screenshot of “Authentication” on Azure portal

Setup of the “Sign Up and Sign In” User Flow

Image for post
Image for post
Edited screenshot of “Create a user flow” on Azure portal
Image for post
Image for post
Edited screenshot of “User flow configuration” on Azure portal

Avoid Unpleasant Surprises

Image for post
Image for post
Edited screenshot of “User flows” on Azure portal
Image for post
Image for post
Edited screenshot of “Run user flow” on Azure portal

Endpoint Evaluation

{
"issuer": "https://fakesystem.b2clogin.com/4bd4d349-4cc8-4b57-83a8-3f0430842e5e/v2.0/",
"authorization_endpoint": "https://fakesystem.b2clogin.com/fakesystem.onmicrosoft.com/oauth2/v2.0/authorize?p=b2c_1_susi",
"token_endpoint": "https://fakesystem.b2clogin.com/fakesystem.onmicrosoft.com/oauth2/v2.0/token?p=b2c_1_susi",
"end_session_endpoint": "https://fakesystem.b2clogin.com/fakesystem.onmicrosoft.com/oauth2/v2.0/logout?p=b2c_1_susi",
"jwks_uri": "https://fakesystem.b2clogin.com/fakesystem.onmicrosoft.com/discovery/v2.0/keys?p=b2c_1_susi",
"response_modes_supported": [
"query",
"fragment",
"form_post"
],
"response_types_supported": [
"code",
"code id_token",
"code token",
"code id_token token",
"id_token",
"id_token token",
"token",
"token id_token"
],
"scopes_supported": [
"openid"
],
"subject_types_supported": [
"pairwise"
],
"id_token_signing_alg_values_supported": [
"RS256"
],
"token_endpoint_auth_methods_supported": [
"client_secret_post",
"client_secret_basic"
],
"claims_supported": [
"name",
"emails",
"newUser",
"sub",
"idp",
"tfp",
"iss",
"iat",
"exp",
"aud",
"acr",
"nonce",
"auth_time"
]
}

The “Run User Flow” Endpoint

Image for post
Image for post
Courtesy of the author

Run User Flow

Image for post
Image for post
Edited screenshot of “Sign up now” on Azure portal

Look Inside the Decoded Token

Image for post
Image for post
Edited screenshot of “Decoded JWT token” on https://jwt.ms

Administer Your Users

Image for post
Image for post
Edited screenshot of “Users Administration” on Azure portal

Finally

Written by

Software Engineer who enjoys gardening and blogging about the latest Tech. Part-time student of AI and Fiction Writing.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store