Microsoft Entra Id SAML OIDC Documentation

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up single sign-on by registering an app and swapping trust keys. This microsoft entra id saml oidc documentation explains both login flows in plain words. Teams often link their directory to internal tools so staff can log in fast. Still, teams often grant broad group roles just to make the login work. Those wide roles give users way too much power inside production systems. How microsoft entra id saml oidc documentation explains login flows Microsoft Entra ID acts as the central sour

Microsoft Entra ID (Azure AD) + SAML 2.0: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up single sign-on by registering an app and swapping trust keys. This microsoft entra id saml oidc documentation explains both login flows in plain words. Teams often link their directory to internal tools so staff can log in fast. Still, teams often grant broad group roles just to make the login work. Those wide roles give users way too much power inside production systems.

How microsoft entra id saml oidc documentation explains login flows

Microsoft Entra ID acts as the central source of truth for user identities. It supports two main ways to log users into your internal apps. The first way is SAML, which uses signed XML messages to pass user details. The second way is OIDC, which uses modern JSON tokens over standard web calls.

To set up SAML, you create an enterprise app record in your directory. You give the app the login URL and the public signing key from Entra. Then you give Entra the reply URL and entity ID from your app. When a user logs in, Entra sends a signed XML claim to the app. The app checks the signature against the public key and starts the session.

To set up OIDC, you register an app and create a client secret. You also set the redirect URI where Entra will send the user back. When a user logs in, Entra sends an authorization code to that redirect URI. The app trades that code for an ID token and an access token. Both flows let you map directory groups to app roles during the login step.

What directory login solves and what it misses

Linking your apps to a central directory solves several big problems right away. You no longer need to create local usernames and passwords for every tool. When someone leaves the team, you disable one account to stop all logins. You can also require multi-factor checks before Entra issues any SAML or OIDC token.

Still, directory login only checks who a person is at the front door. Once the app accepts the token, Entra steps out of the picture. The directory cannot see what SQL queries or shell commands the user runs next. If a developer gets a broad admin role, they can drop tables by mistake. They can also read raw emails, phone numbers, card numbers, or national IDs.

Microsoft Entra ID (Azure AD) + SAML 2.0: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Shared database accounts make this visibility gap even worse for security teams. Many backend databases and servers do not read SAML assertions or OIDC tokens. Teams end up sharing one master password after passing the initial web login. Audit logs then show the shared account name instead of the real person.

How to tighten group claims and role mapping

You can reduce risk by keeping your directory group claims small and specific. Do not map a general engineering group to a full admin role. Create separate groups for read-only work, routine writes, and rare schema changes. Set short token lifetimes so the app checks the user status more often.

Even with tight groups, static roles stay active for the whole user session. You still need a way to check individual commands and mask sensitive fields. Combining directory login with command-level checks closes the gap between login and execution.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Should my team pick SAML or OIDC for internal tools?

Pick OIDC for modern web apps, mobile apps, and command line tools. It uses lightweight JSON tokens that are easy for developers to handle. Pick SAML for older enterprise software that only supports XML login flows.

How do group claims work in Microsoft Entra ID tokens?

You can configure your app registration to include group IDs inside the login token. When the user logs in, the app reads those group IDs from the token. The app then matches those IDs to its own internal permission levels.

Does disabling a user in Entra stop their active app sessions?

No, disabling a user only stops Entra from issuing new login tokens. Any app session that is already open will stay active until its token expires. You must revoke the session inside the target tool to kick the user out.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.