Using Authsignal for MFA with Microsoft Azure AD B2C
Learn how to integrate Authsignal for MFA when using Microsoft Azure AD B2C.
Authsignal provides a simple integration with Azure AD B2C via our Open ID Connect (OIDC) endpoints.
With this integration you can use Azure AD B2C’s custom policies and technical profiles to orchestrate passwordless login and adaptive MFA through Authsignal’s pre-built UI.
The guide below outlines how to use Authsignal as a MFA provider for Azure AD B2C. Authsignal provides other utility endpoints to achieve further customization, see Authsignal’s custom policy code snippets.
Authsignal integrates with Azure AD B2C by acting as an OIDC provider - this integration model can also be used for other platforms which support OIDC.
Prerequisites
This guide assumes that you have already set up an Azure AD B2C tenant and are using custom policies. If not, it is recommended to familiarize yourself with Azure AD B2C custom policies and to follow Microsoft’s official getting started with custom policies guide before continuing.
We also assume that you have an Authsignal tenant created, with at least one Authenticator enabled. Enable an Authenticator on your Authsignal tenant here.
Sequence
The following sequence diagram demonstrates the necessary orchestration steps and corresponding requests when using Authsignal as an MFA provider for Azure AD B2C.
Code example
You can find a full code example referenced in this guide on Github.
This guide builds on top of the SignUpOrSignIn policy from the Azure AD B2C starter pack.
Step by step guide
Step 1: Add orchestration steps to your user journey
Add the following five steps to your user journey. These steps should be performed after the user has been identified, but before the user is authenticated and issued a token.
See the orchestration steps in context of a custom policy file
Step 2: Add the base technical profile
This is the base technical profile that is used to connect to the Authsignal Connect (OIDC) API by setting the authorization header, request body and other necessary configuration for the Azure AD B2C’s RestfulProvider. It is referenced by other technical profiles.
See the base technical profile in context of a custom policy file
Step 3: Add the init auth technical profile and corresponding input claims transformation
Replace the AUTHSIGNAL_CONNECT_HOSTNAME
and INSERT_AUTHSIGNAL_ACTION
placeholders with the appropriate values.
A list of available hostnames can be found in the OIDC documentation. You should use the hostname where your Authsignal tenant is located.
Technical profile:
See the init auth technical profile in context of a custom policy file
Input Claims Transformation:
Replace the INSERT_AUTHSIGNAL_ACTION
placeholder with the desired Authsignal action.
See the init auth input claims transformation in context of a custom policy file
Step 4: Add the OIDC authorize technical profile and corresponding output claims transformations
Replace the AUTHSIGNAL_CONNECT_HOSTNAME
and INSERT_AUTHSIGNAL_TENANT_ID
placeholders with the appropriate values.
Technical profile:
See the OIDC authorize technical profile in context of a custom policy file
Output Claims Transformations:
See the OIDC authorize output claims transformation in context of a custom policy file
Step 5: Add technical profiles for the error pages
These are basic error pages shown when the authentication challenge is failed. It is using the default api.selfasserted
content definition. You may want to customize this page to suit your branding.
See the error technical profile in context of a custom policy file
Step 6: Declare the claims used by the technical profiles
See the claims in context of a custom policy file
Step 7: Store your Authsignal Tenant Secret on Azure AD B2C
Your Authsignal tenant secret is stored as a policy key on Azure AD B2C’s Identity Experience Framework and referenced by our technical profile with the Id B2C_1A_AuthsignalSecret
.
You can find the secret key for your tenant in the Authsignal Admin Portal and add it to your Azure AD B2C tenant as a policy key via the Azure Portal.
Step 8: Upload your custom policy and test your integration
You can now test your integration by navigating to your custom policy in the Azure AD B2C portal and clicking “Run now”. You should see the Authsignal UI for MFA after enrolling your user and for subsequent login attempts.
Congratulations!
You have successfully integrated Authsignal with Azure AD B2C for MFA.
Next steps
Was this page helpful?