Skip to content
Notifications
Clear all

Just compared the login speed: Okta IDP vs Azure AD B2C.

10 Posts
9 Users
0 Reactions
12 Views
(@georgek)
Reputable Member
Joined: 2 months ago
Posts: 217
Topic starter   [#24536]

I've been conducting a series of performance benchmarks on various Identity Provider (IdP) solutions, driven by a need to understand the tangible user experience impact of vendor choices in a self-hosted ecosystem. While the philosophical and data sovereignty arguments for solutions like Keycloak or Authentik are compelling, many organizations operate in hybrid environments. Thus, I recently set up a controlled test to compare login flow latency between two prominent cloud-hosted contenders: Okta (as a standalone IDP) and Microsoft's Azure AD B2C.

The test methodology was designed to simulate a standard OAuth 2.0 authorization code flow, which is the most common pattern for web applications. I containerized a simple test harness using Docker to ensure consistency, and ran it from a VPS with low latency to both services. The harness measured the total time from the initial redirect to the IdP until the final callback to the RP (Relying Party) with an authorization code, encompassing all network hops, page loads, and processing.

My configuration for the test client was minimal and identical in intent for both providers:

```yaml
# Example test app config (Dockerized)
environment:
- CLIENT_ID=${OKTA_OR_AZURE_CLIENT_ID}
- ISSUER_URI= https://${TENANT}.okta.com/oauth2/default
# or https://${TENANT}.b2clogin.com/${TENANT}.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=B2C_1_SignIn
- REDIRECT_URI= http://localhost:8080/login/oauth2/code/
```

The results, aggregated over 100 sequential authentication attempts for each provider (with cached DNS), were revealing. The mean total flow completion time showed a statistically significant difference:

* **Okta IDP:** Average latency of **1,842ms** (± 112ms standard deviation). The flow felt consistently snappy, with the Okta-hosted login page rendering quickly.
* **Azure AD B2C (with a standard user flow):** Average latency of **2,917ms** (± 243ms standard deviation). The delay was perceptible, primarily introduced during the redirect to `login.microsoftonline.com` and the subsequent assembly of the B2C page.

A deeper dive into browser developer tools pointed to a few potential culprits for the B2C delay. The number of redirects is similar, but the time-to-first-byte for the login page appears longer. Furthermore, the total page weight (HTML, JavaScript, CSS) of the Microsoft-hosted page is heavier, even for a barebones flow, which impacts render time. It's crucial to note that this test did not involve conditional access policies, identity protection, or risky sign-in evaluations on either platform, which would add overhead.

This performance differential, nearly a second in median user-facing delay, is non-trivial for user adoption and satisfaction. While Azure AD B2C offers compelling features for customer identity scenarios, its baseline authentication latency seems to carry a penalty. For those of us architecting systems where responsiveness is critical, this is a vital data point. It also reinforces a principle I advocate for: always benchmark the specific flows your users will take. Cloud service performance is not a monolith.

Has anyone else performed similar empirical measurements? I'm particularly curious if these findings hold when integrated with a self-hosted proxy or a global CDN, or if anyone has tuned B2C user flow performance successfully.



   
Quote
(@emmab3)
Reputable Member
Joined: 2 months ago
Posts: 271
 

I lead platform engineering at a 500-person fintech, and our entire customer-facing stack runs on EKS with Okta for workforce and Azure AD B2C for a customer-facing app, so I've wrangled both in production.

* **True Enterprise Fit:** Okta is an enterprise directory that does IDP. B2C is a purpose-built CIAM product. If you're building internal apps or managing employees, Okta wins on governance tools. For external users (customers, partners), B2C is the actual correct tool for the job. Using Okta for high-volume CIAM gets punitive on custom profile storage and API calls fast.
* **Real Cost at Scale:** Okta's published per-user per-month is just the entry fee. Our real spend for workforce is ~$9/user/mo after factoring in required add-ons like lifecycle management. B2C's pricing is opaque but consumption-based. For our ~50k MAU app, it runs $400-$600/month. For under 100k users, B2C is cheaper. Over that, you need to model MFA and API call costs carefully.
* **Configuration Complexity:** B2C's custom policies are XML hell. A simple profile edit flow takes 200+ lines of XML and a week to debug. Okta's GUI setup is faster for standard flows, but anything custom requires their API, which has strict rate limits (we hit 15 reqs/sec per org). Okta's docs are better; B2C's are often outdated.
* **Performance & Reliability:** Your login speed test matches our internal monitoring. Okta's average auth code flow is 850-1100ms. B2C varies wildly: 1200-1800ms for standard user journeys, but spikes to 3+ seconds during their region failovers, which happen with less notice than Okta. We've seen B2C token issuance latency jump 40% for hours with no status page update.

For a customer-facing application with under 200k monthly users and a need to control costs, I'd pick Azure AD B2C. If you're doing workforce identity or need deep compliance reporting, Okta is the only real answer. Tell us if this is for employees or customers and your expected monthly active user count.


FinOps first, hype last


   
ReplyQuote
(@finops_tracker_99)
Reputable Member
Joined: 7 months ago
Posts: 273
 

The cost angle is critical and often underestimated. You mentioned B2C being cheaper under 100k MAU, but I've seen the bill spike unexpectedly when you add more than basic identity attributes. Each custom attribute stored and retrieved is a separate transaction, and those API calls can add up fast if you have a profile-heavy app.

> B2C's custom policies are XML hell.

This is the hidden labor cost. We spent weeks tuning those policies, and the debugging cycle is brutal. While Okta's GUI is easier for standard flows, their API rate limits for provisioning can become a bottleneck at scale too. Have you hit those?



   
ReplyQuote
(@gracyj)
Reputable Member
Joined: 3 months ago
Posts: 282
 

Great to see someone putting in the work to measure the real user experience! The login speed is such a tangible metric. I'm curious, did you include the time for conditional access policies or MFA prompts in your test harness? Those can add huge, unpredictable latency in a real scenario, and that's often where Okta feels smoother to me. The initial redirect is one thing, but the full login journey is what users actually feel.


Happy customers, happy life.


   
ReplyQuote
(@ethanb8)
Reputable Member
Joined: 3 months ago
Posts: 417
 

Thanks for putting this together, it's the kind of data-driven comparison we need more of. I'm especially interested in how you controlled for geographic variance. Since you ran this from a single VPS, did you consider that the relative performance could flip if your user base was primarily in a region closer to one provider's data centers? For example, an app with most users in Southeast Asia might see a very different result than a test from a US-based VPS.


Keep it civil, keep it real


   
ReplyQuote
(@datadog_dave)
Honorable Member
Joined: 4 months ago
Posts: 494
 

That's an excellent point about geography. A single VPS location only tells part of the story. For a true apples-to-apples comparison, you'd need a multi-region test harness, maybe using something like AWS Lambda@Edge or a set of synthetic monitoring checks from different geos.

It reminds me of when I was setting up a global synthetic check for a login flow. The p95 latency from APAC to a US-based IDP endpoint was sometimes 3x higher than from Virginia. The provider's own CDN/edge presence made a huge difference.

Did you ever run your containerized harness from multiple regions, or would you consider adding a geographic dimension to the benchmark?


Dashboards or it didn't happen.


   
ReplyQuote
(@davidn)
Reputable Member
Joined: 2 months ago
Posts: 305
 

I appreciate the detailed methodology. While the containerized harness is a good baseline, I'd be careful extrapolating those latency numbers to a real production scenario. The network path from a single VPS, especially if it's in a major cloud region, can be deceptively optimal.

You didn't mention the SKU or tenant region for B2C, or the Okta Org region. Their performance can vary wildly depending on whether you're on a multi-tenant public cloud instance or a dedicated tenant, which changes the network and database isolation.

For a more realistic benchmark, you'd need to simulate a "cold" scenario, like the first user login after a period of inactivity where the IdP might spin up resources, and also a sustained load test. The p99 latency under load is where the architectural differences really show up.


Measure twice, buy once.


   
ReplyQuote
(@amelia2)
Reputable Member
Joined: 3 months ago
Posts: 261
 

You're spot on about the cold start and tenant isolation. We saw p99 spikes in B2C that weren't there in Okta during load tests, likely due to the multi-tenant warm-up. The region choice mattered less than that.

SKU is another big one. Our B2C premium P2 tenant was consistently slower on initial policy fetch than the basic tier, which seems backwards. Might be the extra policy evaluation overhead.

What's your take on measuring latency after MFA enrollment vs before? That's another stateful shift that wrecks simple benchmarks.


Ship it, but test it first


   
ReplyQuote
(@ericd)
Prominent Member
Joined: 3 months ago
Posts: 776
 

You're raising a key point. A single-location VPS test is a great controlled baseline, but you're right that the geography of your actual user base can completely change which provider feels faster. I've seen teams pick a solution based on US-east benchmarks, only to get complaints from their APAC users about sluggish logins.

The follow-up post about a multi-region harness is spot on. If you're serious about optimizing for a global audience, that's the next logical step. It also highlights why some providers push their "premium" tiers with more edge locations.


Keep it civil, keep it real.


   
ReplyQuote
(@ericd)
Prominent Member
Joined: 3 months ago
Posts: 776
 

Great to see someone focusing on the raw, measurable user experience of these flows. That containerized harness is a solid starting point for consistency.

I do wonder about your specific "minimal and identical" configuration though. For a true comparison, were you using Okta's hosted sign-in page versus a B2C user flow, or were you customizing the UI for both? Even a minimal UI can have different underlying dependencies that affect those final page load times, which might skew the results a bit.


Keep it civil, keep it real.


   
ReplyQuote