Skip to main content
All Keycloak alternatives
Keycloak vs. Azure AD B2C

Azure AD B2C is end of sale. You have until 2030 to choose well.

B2C stopped being sold to new customers on 1 May 2025 and Microsoft supports it until at least May 2030. It is not being shut down — it is frozen. The question is not how fast you leave, it is where you land: stay, move to Entra External ID, or move to Keycloak. If your logic lives in custom policies, every one of those three means a rebuild.

Open-source parity with
OktaAuth0PingWorkOSOneLogin
At a glance
Full table →
Azure AD B2CYou
Keycloak
Still sold to new customers
Roadmap and new investment
Custom policies / IEF carry overn/a
Full HTML/CSS login customization
Export your password hashes
Run it somewhere other than Azure
The short version

Keycloak vs. Azure AD B2C at a glance

DimensionAzure AD B2CKeycloak (with Phase Two)
Commercial statusEnd of sale 1 May 2025; supported to at least May 2030✓Apache 2.0, CNCF project, quarterly releases
LicensingPer monthly active user; first 50,000 MAU freeNo licence fee; you pay for hosting
Premium tierP2 discontinued 15 March 2026 for all customers; tenants run on P1✓One edition, no feature gates
Custom authentication logicCustom policies (Identity Experience Framework XML)✓Configurable authentication flows, plus the Java Authenticator SPI
Login UICustom HTML/CSS page templates, hosted by you✓Theme system: login, account, email and admin
Credential portabilityNo password-hash export, by any API✓Your database, your hashes
Hosting and residencyAzure only✓Anywhere — your cloud, on-premise, Kubernetes, or managed in Frankfurt
Operational burdenNone. Microsoft runs it, with an SLAReal — a JVM, a database and an upgrade cycle, unless someone runs it for you
01 — Status

What actually happened to Azure AD B2C

Three separate announcements got compressed into one rumour, so start with the dates. All of them come from Microsoft's own B2C FAQ.

DateWhat changed
1 May 2025B2C is no longer available to purchase for new customers. Existing customers keep using it and can still create tenants — on P1.
15 March 2026Premium P2 is discontinued for all customers. Tenants moved to P1, and the P2-only capabilities — ID Protection among them — went with it.
May 2030The earliest date Microsoft's support commitment runs to. SLAs, security updates and compliance are unchanged until then.

So: end of sale, not end of life. Your tenant is not being retired in 2026, and anyone telling you otherwise has read the P2 date as a tenant-retirement date. What you have lost is the roadmap. B2C gets security updates and operational continuity; it does not get new capability, and the product Microsoft is investing in is Microsoft Entra External ID.

That is a real cost, just a slow one. Four years is long enough to plan properly and short enough that a platform decision made today is the one you live with.

02 — Options

Your three realistic options

There are exactly three, and the honest answer is that the first one is right for a lot of teams.

OptionFits whenThe cost of it
Stay on B2CBuilt on user flows, all-Azure, under the free MAU tier, nobody asking about residency or source accessA dated platform and a decision deferred, not avoided
Entra External IDSimple B2C setup, deep Microsoft commitment, little or no custom-policy logicRebuild of your authentication logic; several B2C features do not exist there
KeycloakCustom policies, third-party federation, residency requirements, or you want the platform decision to be yours next timeRebuild, plus an operational story you own or buy

The question that separates them is not price and it is not features. It is how much of your authentication logic lives in custom policies. A tenant running two built-in user flows has three cheap options. A tenant running a custom policy with orchestration steps, REST calls and claims transformations has one expensive decision, and it is the same expense whichever destination it picks.

We wrote the long version of this as what Azure AD B2C's end of sale actually means — including the questions that decide it.

03 — Parity

What Entra External ID does not carry over

This is the part that surprises people, and it is in Microsoft's own B2C-to-External-ID migration guide, not in anyone's marketing.

  • Custom policies do not move. The guide maps "Custom policies (XML/IEF)" to "Custom authentication extensions" — a different model, not a converter. There is no tooling that takes your TrustFrameworkExtensions.xml and produces the equivalent.
  • Third-party identity providers configured through custom policies are not supported. The guide says so in those words. Social federation has to be reconfigured on External ID's built-in providers, and anything outside that list is a gap you have to design around.
  • UI customization narrows. B2C's hosted HTML/CSS page templates map to "user flows with branding" — a company-branding menu rather than pages you author.
  • Native authentication is local-accounts only, per the same feature-mapping table. If your mobile apps authenticate against social providers without a browser redirect, check this one first.

None of that makes External ID a bad product. It makes it a new product, aimed mostly at new deployments. The conclusion a B2C customer should draw is narrower and more useful: you are rebuilding your authentication logic whichever destination you choose. Given that, the destination worth picking is the one where the next platform decision is yours.

The receipts

See it side-by-side

What you actually get for what you actually pay.

Feature & cost comparison
Azure AD B2CYou
Keycloak + Phase Two
Sold to new customers
Active roadmap and new features
Premium tier intact
Full HTML/CSS login customization
Any OIDC / SAML identity provider
LDAP / Active Directory federation
Password hashes you can export
Deploy outside one cloud
Source access and custom extensions
Zero operational burden
Free tiern/a
Fixed cost, whatever your MAU count
04 — Mapping

Where each B2C concept lands in Keycloak

Keycloak has a direct equivalent for most of what a custom policy expresses, and the equivalents are configuration rather than XML.

Azure AD B2CKeycloak
User journeyAuthentication flow
Orchestration stepExecution, or a subflow with a condition
Technical profile (validation)Authenticator, built-in or your own via the Authenticator SPI
Technical profile (federation)Identity provider — any OIDC or SAML endpoint
Claims transformationProtocol mapper, or a script mapper for the awkward ones
REST API technical profileCustom Authenticator SPI in-flow; Workflows for out-of-band steps
Page layout (HTML/CSS)Keycloak themes
User flow attributesDeclarative user profile

What has no clean equivalent: the parts of the Identity Experience Framework that are a programming language rather than a configuration — long claims-transformation chains, and orchestration that branches on computed values. Those become Java.

05 — Migration

Moving your users, and the password problem

B2C will not give you your password hashes. Microsoft Graph writes a password and never reads one back, and Microsoft's own migration guidance for preserving passwords is not an export — it is validating each credential against B2C at the moment the user next signs in. That constraint shapes the whole project, and it applies no matter where you are going.

So you pick from three patterns, usually more than one of them:

  • Just-in-time migration. Profiles are bulk-imported with no credential; a user storage provider validates the first login against B2C, then stores the password in Keycloak. Nobody resets anything.
  • Broker B2C temporarily. Keycloak federates to B2C as an OIDC identity provider, you move applications to Keycloak immediately, and credentials follow later.
  • Forced reset for the stragglers. Whatever JIT has not picked up by your cutover date gets a reset mail. There is always a tail.

Effort, honestly, as ranges rather than promises: a simple tenant with one or two built-in user flows and a couple of social providers is a few weeks. A tenant with custom policies, several enterprise federations and custom claims is two to four months. The custom-policy rewrite is most of that, and it is work you owe whichever platform you pick.

We do this as a service — see migrate to Keycloak.

06 — Verdict

When you should not pick Keycloak

B2C genuinely wins on things Keycloak cannot match, and they are not small. Zero operational burden. A Microsoft SLA. Deep Azure-native integration — Front Door custom domains, Application Insights, federation to your Entra workforce tenant. And 50,000 free monthly active users, which is more than most applications ever need.

If you are an all-Azure shop running built-in user flows under the free tier, with nobody asking about data residency or source access, sitting tight until 2030 is a defensible engineering decision and anyone selling you urgency is selling you something. Revisit it in 2028.

Keycloak earns the move when at least one of these is true: your logic lives in custom policies and you are rebuilding anyway; you need to run identity somewhere other than Azure, for EU data residency or for a customer's contract; you need federation or protocol support beyond what a successor product supports; or you want the next end-of-sale announcement to be somebody else's problem.

And if you are moving to escape an operations bill, price the operations bill first. Keycloak is a JVM application with a database, a cache and an upgrade cadence; running it well is a real job. That is the argument for managed Keycloak rather than a VM you own — and if you would rather own it, we also support teams who run their own.

Migration

Already on Azure AD B2C?

You have until 2030, so there is no reason to rush and every reason to plan. We map your user flows and custom policies onto Keycloak, migrate users without resetting passwords, and run the cutover.

See how we migrate teams to Keycloak
How we deliver

Two ways to run Keycloak with Phase Two

Managed Hosting

Managed Keycloak Hosting

Multi-region, high-availability Keycloak with 100+ extensions. Simple, cost-conscious, and customizable.

  • Unlimited users on every tier
  • Up to 99.99% uptime SLA & SOC 2
  • Custom domains & branding
  • Dedicated clusters from $149/month
Enterprise Support

Enterprise Keycloak Support

Run your own Keycloak? Get expert escalation, security patches, and architecture guidance — at any level of complexity.

  • 24/7 escalation with named engineers
  • Security advisories & patch backports
  • Architecture & migration reviews
  • Dedicated Slack channel
Learn more
FAQ

Frequently asked questions

Is Azure AD B2C being discontinued?

No. Azure AD B2C reached end of sale, not end of life. It stopped being available to new customers on 1 May 2025, and Microsoft's FAQ says it will be supported "until at least May 2030" with SLAs, security updates and compliance unchanged. Existing customers can keep using it and can still create tenants. What ended is new investment in the product.

When does Azure AD B2C end?

The only firm dates Microsoft has published are 1 May 2025 (no longer sold to new customers), 15 March 2026 (Premium P2 discontinued for all customers, tenants moved to P1) and May 2030 (the earliest end of the support commitment). Blogs claiming tenants retire on 15 March 2026 have mistaken the P2 date for a tenant-retirement date — that is not what Microsoft says.

Can I export passwords from Azure AD B2C?

No. Microsoft Graph lets you write a password onto an account and never read one back, and there is no API that returns password hashes. Microsoft's own guidance for preserving passwords is just-in-time migration — validating each credential against B2C when the user next signs in — rather than an export. The same constraint applies whether you move to Entra External ID or to Keycloak.

Is Keycloak a good alternative to Azure AD B2C?

For a B2C tenant built on custom policies, yes — because that logic has to be rebuilt on any destination, and Keycloak's authentication flows plus the Authenticator SPI are a closer match to what the Identity Experience Framework actually does than a managed successor's extension points are. Keycloak also keeps full HTML/CSS login customization and runs anywhere. For a simple tenant inside the free MAU tier with no residency requirement, B2C's zero operational burden is a genuine advantage and staying is reasonable.

How long does a B2C to Keycloak migration take?

As ranges rather than promises: a simple tenant with one or two built-in user flows and a couple of social identity providers is a few weeks. A tenant with custom policies, several enterprise federations and custom claims is two to four months. The custom-policy rewrite dominates the estimate, and user migration is usually the predictable part.

What happens to my custom policies (IEF) if I move?

They are rewritten, not converted, on every destination. Microsoft's migration guide maps custom policies to Entra External ID's custom authentication extensions — a different model with no converter — and explicitly says third-party identity providers configured through custom policies are not supported there. On Keycloak, user journeys become authentication flows and most technical profiles become configuration; the parts of the Identity Experience Framework that behave like a programming language become Java.

Rebuild once, on your own terms.

A 30-minute review of your B2C tenant — user flows, custom policies, federation — and an honest estimate of what moving it costs.