A. B. Khan

Microsoft Entra ID in plain language

The Mesh Series · Article 7

Microsoft Entra ID.NET & C#Scopes & app rolesAzureKubernetesWorkload identityIstioPasswordless

Cover: Microsoft Entra ID in plain language

Tenants, app registrations, service principals — and why an identity that reads as all zeros is about to stop working

You moved your web apps to Kubernetes and the authentication story fell apart on the way in.

On Windows, identity was almost free. The app ran under a domain account, Windows-integrated auth and LDAP did the rest, and nobody wrote a line of code to answer "who is this?" Containerize the same app and that scaffolding is gone. A Linux container has no domain membership, no Kerberos ticket, no machine account. So each service starts reinventing authentication — a little LDAP client here, a hand-rolled token check there — and you end up with the thing I keep warning about: not a microservice architecture, but a distributed monolith held together with auth tokens and prayer.

Entra ID is the answer to the question every one of those services is now asking on its own: who is allowed to do anything? Before you can put it to work, you have to stop treating it as "the Azure login box" and learn its object model. It's four boxes. Once you see them, most of the confusion — and most of the security incidents — resolve themselves.

Diagram: object model

The blueprint and the instance

The single distinction that trips up most teams: an app registration is not the same thing as a service principal.

The app registration — Microsoft's formal name is the application object — is the blueprint. It lives exactly once, in the tenant where you registered it (its "home" tenant). It carries the application's identity: the display name, the redirect URIs, the client ID (also called the application ID), the secrets or certificates, the permissions the app wants, and the app roles it defines. Think of it as the class definition.

The service principal is the instance. It's the concrete object, living inside a specific tenant, that actually gets permissions granted to it, gets users assigned to it, and shows up in your sign-in logs. In the portal you meet service principals under a confusingly different name — "Enterprise applications." Same object. When you register an app, Entra creates a service principal for it in the home tenant automatically. When another organization consents to your multitenant app, a service principal for it appears in their tenant. One blueprint, many instances.

Two IDs cause more wasted afternoons than any other pair of GUIDs in this ecosystem. The client ID (application ID) identifies the blueprint and is the same everywhere. The object ID identifies a specific service principal in a specific tenant and is different in each one. When a config value doesn't work, the odds are good someone pasted the object ID where the client ID belonged, or grabbed the object ID of the app registration instead of the object ID of the service principal. They are not interchangeable, and the error messages will not tell you which one you got wrong.

Then, hanging off the service principal, two ways an application is allowed to act. Delegated permissions — scopes — mean the app acts on behalf of a signed-in user, and can never do more than the intersection of what the app was granted and what that user is actually allowed to do. App roles — application permissions — mean the app acts as itself, with no user in the picture, which is how your background workers, batch jobs, and service-to-service calls authenticate. The distinction is not academic. A delegated token is bounded by a human's rights; an app-role token is bounded by nothing but what you granted the app. Over-grant an app role and you've handed a daemon standing permission to read your entire directory, forever, with no user to constrain it.

Why an auditor cares about all of this

Here is where the object model stops being trivia.

In a regulated institution, the auditor's question is not "do you use Entra?" It's "when this API was called at 02:14, who called it, and how do you prove it?" That question is the whole demo-to-audit gap in one sentence. LDAP-in-every-service could never answer it cleanly — the identity was checked in a dozen inconsistent places and logged in none of them consistently. Centralizing identity in Entra is the move that lets you answer it at all. The service principal is the row in the log that says this specific instance, with this object ID, acting under this app role, made this call.

Which is exactly why Microsoft is about to break a shortcut a lot of teams have been quietly relying on.

Until now, a multitenant app could obtain an app-only token from a tenant without ever creating a service principal there. In the sign-in logs, those calls show a service principal ID of 00000000-0000-0000-0000-000000000000 — all zeros — and the token carries no object-ID claim. An identity that reads as all zeros. From an auditor's chair, that's not an identity at all; it's a call from nobody. On 31 March 2026, Entra ID stops issuing those tokens. App-only authentication by non-Microsoft multitenant apps that lack a service principal in the resource tenant will simply be blocked. The fix is to create the service principal so the call resolves to a real object ID instead of a string of zeros.

Read that as a signal, not a chore. The platform is closing the exact gap the auditors have been pointing at. Under India's CERT-In directions you have six hours from noticing an incident to report it, with logs retained inside Indian jurisdiction; under RBI's framework the accountability runs to the board. In Saudi Arabia, SAMA assesses you on a maturity model — you don't pass by showing the control exists once, you pass by proving it operates continuously. Every one of those obligations assumes your logs name a real principal. An all-zeros identity fails all of them at the same time. The industry is being nudged, on a deadline, toward the thing that survives an audit.

Where Entra sits in the mesh

Entra is one plane in a four-technology system, and it's worth being precise about which job it does.

Kubernetes runs the workloads. Istio governs how those workloads talk to each other — mutual TLS, policy, telemetry — and issues each workload its own cryptographic identity inside the mesh. Your C#/.NET service is the workload. Entra is the issuer and authority for identity that comes from outside the mesh: the human user who signed in, and the Azure resources — Key Vault, a database, a queue — your service needs to reach.

The clean division of labour, which the next article develops in full: Entra owns user identity; Istio owns workload-to-workload identity. A user's token is minted by Entra, validated at the mesh edge and again inside your service. A workload's identity inside the cluster is minted and rotated by the mesh. Where the two worlds meet — a workload that needs to call an Azure resource as itself — Entra's workload identity federation lets your Kubernetes service account exchange its projected token for an Entra token, with no secret stored anywhere. That's the workload half of going passwordless, and it gets its own article.

For today, hold this: when your C# service validates a bearer token, the authority it trusts is Entra, and the principal it logs is an Entra object. Get the object model right and that log line is audit-grade. Get it wrong and you're writing zeros.

The code: the object model, made concrete

Two snippets. First, a background worker authenticating as itself — an app role, no user — using MSAL.NET. This is the client-credentials flow, and it's how most service-to-service calls in a regulated estate actually run.

Code: client credentials

Two things to notice. There is no user anywhere in that flow — this is the app-role path, and the token it returns is constrained only by what you granted the app registration, so grant narrowly. And the credential is a certificate, not a client secret pasted into appsettings. That is deliberate: a secret in config is a secret you're afraid to rotate, and the whole series bends toward having fewer of them. (The series baseline is .NET 8; .NET 10 has been the LTS release since November 2025, and the MSAL surface here is identical on both — start new work on 10.)

Second, the resource side — a C# API validating an incoming Entra token. Microsoft.Identity.Web wraps the JWT plumbing so you're configuring, not hand-rolling signature checks.

Code: validate

The audience has to match the token's aud claim exactly or every request fails validation, which is the second-most-common wasted afternoon after the ID mix-up. And validation needs no secret at all — the API trusts Entra's public signing keys, fetched and rotated automatically. One side holds a credential; the other side holds nothing but trust in the authority. That asymmetry is the point.

Security · Audit · Integration

You could also use something else

Entra is the right default when your workloads run on Azure/AKS and your workforce already lives in Microsoft 365 — the federation, Conditional Access, and workload identity all come for free, and "free" is doing real work in that sentence. But it is not the only credible identity plane, and pretending otherwise is how you end up defending a choice you never actually made.

Keycloak is the serious open-source option, and the right call when you need the identity provider itself to run inside your own cluster and jurisdiction — which, given KSA in-Kingdom and RBI in-India data-residency rules, is a live requirement, not a hypothetical. You trade managed-service convenience for operational ownership: you now run, patch, and prove the uptime of your IdP. Okta and Auth0 are the pick when identity spans a messy heterogeneous estate — lots of SaaS, multiple clouds, B2B and B2C federation — and you want a vendor whose entire business is that integration surface rather than one cloud's front door. The honest trade there is cost and a second identity vendor to govern.

The one thing none of them changes: the concepts in this article are portable. Every one of these systems has the same blueprint-versus-instance split, the same on-behalf-of-a-user versus as-itself split. Learn the model once; the vendor is a detail.

And the rebuttal you'll hear in the first architecture review: "if Entra goes down, you're as stuck as when LDAP fell over — you've just moved the single point of failure." It's a fair point and it deserves a straight answer. LDAP-in-every-service was a correctness failure spread thin — inconsistent checks in a dozen places, each wrong in its own way. An Entra outage is an availability failure at one well-understood boundary, and availability failures are the kind you engineer around: cache tokens within their lifetime, keep the mesh's own mTLS working so service-to-service traffic survives a user-sign-in blip, design a degraded mode. Concentrated-but-engineerable beats distributed-and-unknowable. You're not removing the risk; you're moving it somewhere you can actually reason about.

From the toy to the standard

The toy version of this is one app registration, one secret, Directory.Read.All granted "just to make the demo work," and a client ID copied into appsettings. It authenticates. It also fails every audit question that matters, and it's the exact shape the 31 March deadline is built to catch.

The industry-grade version is the same object model used with discipline: one app registration per workload, so a leaked credential compromises one thing and the log names exactly which; app roles granted at the minimum scope the job needs and reviewed like the liabilities they are; certificates over secrets, headed toward no stored credential at all; and every service principal resolving to a real object ID in a log you can hand an auditor without a footnote. Nothing exotic — just the blueprint and the instance, understood and used deliberately.

Next up — Workload identity: how machines prove who they are. Users get passkeys and MFA. Your batch job at 02:00 has neither, and yet it still has to prove it's allowed to reach the database. That's federation, managed identities, and the SPIFFE idea — and it's where Entra and the mesh start to touch.


The Mesh Series — building an audit-ready, zero-trust, passwordless platform on Kubernetes, Istio, C#/.NET, and Microsoft Entra ID, one concept at a time. Full runnable samples in the companion repo.

Key skills & topics in this article

Microsoft Entra ID.NET & C#Scopes & app rolesAzureKubernetesWorkload identityIstioPasswordless

  • #ServiceMesh
  • #Istio
  • #Azure
  • #dotnet
  • #ZeroTrust
  • #Kubernetes

Also on LinkedIn.