Skip to content
Notifications
Clear all

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

5 Posts
5 Users
0 Reactions
0 Views
(@georgek)
Estimable Member
Joined: 2 weeks ago
Posts: 84
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)
Estimable Member
Joined: 3 weeks ago
Posts: 130
 

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)
Estimable Member
Joined: 5 months ago
Posts: 156
 

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)
Estimable Member
Joined: 3 weeks ago
Posts: 143
 

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)
Estimable Member
Joined: 3 weeks ago
Posts: 220
 

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