Latest updates here https://github.com/azure-ad-b2c
Azure AD B2C Identity Experience Framework Custom Policy examples for various scenarios.
The sample policies in this repo are developed and managed by the open-source community in GitHub. This policy is not part of Azure AD B2C product and it's not supported under any Microsoft standard support program or service. The policy is provided AS IS without warranty of any kind.
To use these examples in your own AAD B2C tenant, you will need to make the following changes:
-
Follow the guidance to setup the required keys here.
-
Register the required Application Registrations here.
-
Update the
login-NonInteractive
technical profile in theTrustframeworkExtensions
file as noted here. -
Register an Application Registration to manage any Extension Attributes (schema extensions) within AAD B2C as noted here.
-
Update the
AAD-Common
technical profile in theTrustFrameworkBase
file as noted here. -
Update the
TenantId
parameter in all files to match your B2C Tenant, in the formatsomething.onmicrosoft.com
. -
Create an AAD B2C Application Registration. Choose to include a Web API and add https://jwt.ms as a reply url.
-
Upload and Test your policies via the AAD B2C Blade at portal.azure.com as noted here.
-
Account Link - A policy which will associate a user who logged in via a federated provider to a pre-created Local Account.
-
MFA IP Timeout - A policy which forces the user to do MFA on 3 conditions:
- The user has newly signed up.
- The user has not done MFA in the last X seconds.
- The user is logging in from a different IP than they last logged in from.
-
SAML Relying Party - An example set of policies to integrate with a SAML RP.
-
Username based journey - For scenarios where you would like users to sign up and sign in with Usernames rather than Emails.
-
Email Verification at Sign In - For scenarios where you would like users to validate their email via TOTP on every sign in.
-
Return the access token from a Social IdP - For scenarios where you would like users to return the access token from a Social IdP.
-
Preventing logon for Social or External IdP Accounts when Disabled in AAD B2C - For scenarios where you would like to prevent logons via Social or External IdPs when the account has been disabled in Azure AD B2C.
-
Login with Phone Number - An example set of policies to for passwordless login via Phone Number (SMS or Phone Call).
-
Google Captcha on Sign In - An example set of policies which integrate Google Captcha into the sign in journey.
Find guidance here to help troubleshoot your policies.
Use the VSCode Extension to help develop your policies here.