Skip to content
Migrate

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

The short answer

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

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.

WhatIn the moveHow
Users and profile fieldsMovesDisplay name, given name, surname, enabled, created date.
Sign-in namesMovesFrom identities: the sign-in email or username.
Extension attributesMovesextension_<app id>_name becomes the attribute name.
GroupsMovesFrom memberOf, when you expand it.
PasswordsDoes not moveGraph never returns them; local accounts set a new password by email link.
MFA (TOTP, SMS, email)Does not moveGraph returns TOTP secrets as null; users enroll again.
Social and enterprise identity providersRe-createdRe-created in the realm; users re-link by email.
App registrationsRe-createdRe-created as clients with redirect URIs and scopes.
User flows and custom policiesRe-createdUser flows become realm settings and flows; custom policy logic is rewritten.
Active sessionsDoes not moveEveryone signs in once after the switch.
Branded sign-in pagesDoes not moveClusters run Keycloak’s own themes. Custom themes are not supported yet.
Passwords

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.

Getting the data out

The export

  1. List users with Microsoft Graph, selecting identities and every extension attribute.
  2. Expand memberOf, or list group members, for groups.
  3. 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.

The plan

Moving from Azure AD B2C, step by step

  1. 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. 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. 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. 4

    Tell your users

    Announce the date, the new password by email link, and setting up the authenticator app again.

  5. 5

    Cut over

    Stop sign-ups in B2C, export again, import, switch each app, and send the set-password emails in batches.

  6. 6

    Keep a way back

    Keep the B2C tenant unchanged until you sign the move off, and write down how each app switches back.

How long it takes

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
Who does the work

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.

Starter

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
You
  • 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
Premium and Enterprise

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
You
  • 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
Custom

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
You
  • 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.

Questions

About 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.

Ready to move?

Order a cluster, or write to us first about what you run today.