Migrate from Azure AD B2C to Keycloak
Microsoft stopped selling Azure AD B2C to new customers on May 1, 2025. Move your tenant, or an Entra External ID tenant, to upstream Keycloak on a dedicated cluster, on Azure or AWS. Users and their attributes come along through Microsoft Graph; passwords are set again by email link.
Vendor facts checked on · Sources
Users, their sign-in names and extension attributes move through Microsoft Graph. App registrations, user flows and identity providers are re-created as Keycloak clients, flows and identity providers; custom policies are rewritten. Local accounts set a new password by email link, and authenticator apps are set up again. You test everything on a staging copy first.
What moves from Azure AD B2C, and what does not
Re-created means we build it again in your realm from your inventory; it does not come out of an export.
Passwords are set again by email link
Microsoft Graph lets you set a password and never returns one; there is no export of password hashes. Microsoft’s own guidance for moving B2C users to External ID keeps passwords only by checking them against B2C at sign-in, not by copying hashes. Our clusters run stock Keycloak, so we do not run that kind of just-in-time check.
Azure AD B2C users who sign in with a password set a new one after the move. We import them with Keycloak’s Update Password required action, and Keycloak emails each of them a link to set a new password (the execute-actions email). The link opens Keycloak’s own page and works for as long as you choose.
Users who sign in with Google, Microsoft or another identity provider do not need a password. Once the same provider is set up in your realm, their first sign-in finds their account by email and asks them to confirm the link.
The export
- List users with Microsoft Graph, selecting identities and every extension attribute.
- Expand memberOf, or list group members, for groups.
- List app registrations, user flows, custom policies and identity providers.
Treat the export as a secret: keep it encrypted, never send it by email or chat, and delete every copy when the move is done.
Moving from Azure AD B2C, step by step
- 1
Export
List users with Microsoft Graph, following every next link, with identities and your extension attributes selected. Write down every app registration, user flow, custom policy and identity provider.
- 2
Map
Convert the users with the Azure AD B2C converter: sign-in names, extension attributes, groups, and Update Password for local accounts. Re-create app registrations as clients, and decide where each custom policy step lives in Keycloak or in your app.
- 3
Dry run on a staging copy
Import into a staging realm. Sign in through each app as a local and a federated user, and check that apps keyed on the object id find their users.
- 4
Tell your users
Announce the date, the new password by email link, and setting up the authenticator app again.
- 5
Cut over
Stop sign-ups in B2C, export again, import, switch each app, and send the set-password emails in batches.
- 6
Keep a way back
Keep the B2C tenant unchanged until you sign the move off, and write down how each app switches back.
It depends, and on what
We do not give a length without seeing what you run. These are the things that set it.
- How much logic lives in custom policies, including REST API calls during sign-in
- Whether apps key data on the object id (oid)
- Whether users rely on SMS or phone call codes, which Keycloak does not offer out of the box
- How many applications sign users in, and how many redirect URIs and token claims each needs
- How many social and enterprise identity providers you use, and how quickly each approves a new redirect URI
- How much notice your users need before the switch
- How many people on your side test the dry run, and when
What each plan includes for a move
Support is in writing, through the dashboard and the contact form. There are no calls and no demos.
You move, with our tools and guides
We- Your cluster, ready before you import
- Free converters, a readiness checklist and email templates
- A guide for your source in the docs
- Answers in writing, first response the next business day
- Export from your current system
- Convert and import into a second realm as a dry run (Starter has two)
- Write to your users and switch your apps
We do the move with you, in the plan’s service hours
We- Plan the move with you from your inventory
- Convert users and re-create clients and identity providers
- Import into a staging copy and fix what the dry run finds
- Import into your cluster at cut-over and watch the first hours
- Uses the plan’s 10 service hours a month
- Export from your current system and hand it over encrypted
- Test the dry run with your own apps
- Send the emails to your users and switch your apps
Very large moves, scoped with you
We- Many realms, very many users, or a long period with both systems running
- Scope, sizing and price agreed in writing
- Tell us what you run through the contact form
Prices and the service hours each plan includes are on the pricing page. A move larger than the plan’s hours is scoped with you as Custom.
Tools for this move
They run in your browser; nothing you paste is sent to us. The Azure AD B2C guide in the docs has the commands.
Azure AD B2C to Keycloak users converter
Turn Microsoft Graph user JSON from Azure AD B2C or Entra External ID into Keycloak import JSON, with extension attributes. Runs in your browser.
Open Free toolMigration readiness checklist
A checklist for moving users to Keycloak from Auth0, Okta, Cognito, Azure AD B2C, Firebase or another Keycloak: export, map, dry run, cut-over and rollback.
Open Free toolMigration email templates
Write the emails you send your own users before the move, on the day and after it, including how they set a new password.
Open Free toolOIDC discovery viewer
Read a provider’s OpenID configuration: endpoints, grant types, algorithms and claims supported.
OpenAbout moving from Azure AD B2C
Can my B2C users keep their passwords?
No. Graph never returns passwords and there is no hash export, so local accounts set a new password by email link.
Is Azure AD B2C going away?
Microsoft stopped selling it to new customers on May 1, 2025, and points existing tenants to Entra External ID. Existing tenants keep working.
Can I move from Entra External ID too?
Yes. Users come from the same Microsoft Graph endpoint, and the same converter reads them.
Do custom policies move?
No. User flows map to Keycloak realm settings and flows; custom policy logic is rewritten as flows, mappers or app code.
Does MFA move?
No. Graph returns TOTP secrets as null, so users set up their authenticator again. SMS codes have no built-in Keycloak counterpart.
Can I stay on Azure?
Yes. Clusters run on Azure West Europe, AWS Frankfurt or AWS N. Virginia.
How long does a move from B2C take?
It depends on your custom policies, apps and identity providers, and on your users’ notice period. We do not give a number without seeing what you run.
Who does the work?
On Premium and Enterprise we do the move with you, within the plan’s 10 service hours a month. On Starter you move with our free tools and guides.
Where the facts on this page come from
Read on 25 November 2026. Vendors change their products: if one of these has, tell us through the contact form and we will correct this page.
Moving from somewhere else
From Auth0
Users, metadata, social logins and apps move. Passwords are set again by email link.
Read the plan New password by email linkFrom Okta
Users, profile attributes, groups and apps move. Passwords are set again by email link.
Read the plan New password by email linkFrom Amazon Cognito
Users, attributes and groups move. Passwords are set again by email link.
Read the plan New password by email linkFrom Firebase Authentication
Users, custom claims and social logins move. Passwords are set again by email link.
Read the plan Passwords keptFrom your own Keycloak or Red Hat SSO
Realms move whole, with password hashes and keys. Users keep their passwords.
Read the plan Kept with a full exportFrom another Keycloak host
With a full export, realms move whole and users keep their passwords.
Read the planReady to move?
Order a cluster, or write to us first about what you run today.