OpenBao OIDC login with Microsoft Entra ID groups

How to sign in to OpenBao with Microsoft Entra ID through the JWT/OIDC method and map Entra groups to OpenBao policies, including the object ID keying and the 200-group overage limit.

On this page

How OpenBao OIDC login with Entra ID groups works

Your organization already manages people in Microsoft Entra ID, and you want OpenBao logins and policies to follow those same groups. The supported method is OpenBao's JWT/OIDC auth method pointed at the Entra ID v2.0 discovery URL, with Entra groups mapped to OpenBao policies through external groups and group aliases keyed on each Azure group's objectId. The flow is simple to describe: a user signs in to Entra ID, OpenBao validates the token against the issuer's discovery document, and the token's claims decide which external group the identity joins and therefore which policies apply. Nothing in this design copies the directory into OpenBao. Users and group memberships stay in Entra ID, and OpenBao only learns about them at login time.

That distinction matters for planning. This is authentication and authorization mapping, not directory replication, so OpenBao holds no user store to administer, and removing someone from a group in Entra ID changes what they receive at their next login rather than deleting anything inside OpenBao. The procedure follows OpenBao's own Azure Active Directory guide, which registers an application with web redirect URIs for the CLI and the UI, sets oidc_discovery_url to the tenant's v2.0 endpoint, and adds a groups claim. Confirm the exact redirect URIs and scopes against the current guide before you register anything, because the CLI callback path and the Graph scope are configuration details that break logins when they drift.

Two constraints shape the design from the start. Applications that use custom signing keys from claims mapping are not supported for OIDC authentication, so check how your tenant's app registration is configured before you commit to the approach. Also, users who belong to more than 200 groups receive _claim_names and _claim_sources in place of the full groups list, which means group-based policies will silently fail for those users unless you plan for it. Decide early which groups must drive OpenBao policy, keep that set small, and test a heavily grouped account before rollout. Your architects should review the group design with the identity team first, since changing group sprawl later is harder than shaping it now.

What you need in place before configuring Entra ID login

Entra ID login touches three systems: the OpenBao cluster, the Entra ID tenant and the network path between a user's browser or terminal and both. Confirm each item below before anyone edits an app registration or an OpenBao auth method, because a missing prerequisite usually shows up later as a redirect or discovery error. The cards are ordered roughly the way the work proceeds.

A running OpenBao cluster over HTTPS

OpenBao must be reachable at the address users will type into the UI and the CLI, served over HTTPS with a certificate those users trust. The address you configure becomes part of the redirect URI that Entra ID checks, so an internal hostname that changes later means re-registering the application. Confirm the cluster is unsealed, the auth method path you plan to use is free, and that clients can reach the port without a proxy that rewrites the callback.

Azure AD guide

The tenant ID and discovery URL

Record the Entra ID tenant ID for the directory that holds your users. OpenBao uses it to build the discovery URL in the form <tenant>/v2.0. Using the wrong tenant, or a guest or secondary directory, produces tokens whose issuer does not match what OpenBao expects. Check the issuer value in the discovery document before you save the OpenBao configuration.

App registration and Graph consent rights

Someone must be able to register applications in the tenant and grant consent for Microsoft Graph permissions. The groups mapping relies on the ` scope, so the signed-in admin needs rights that cover that consent. Ask your Entra ID administrator which role they hold and whether tenant policy requires admin consent for applications. Confirm this before the change window, not during it.

Entra ID comparison

Redirect URIs for the CLI and the UI

Register two Web redirect URIs: the CLI callback at ` and the UI callback for your OpenBao address. The CLI callback uses a local listener on the user's machine, so it is not a server you host. A mismatch between a registered URI and the one OpenBao sends is the most common reason login fails, so copy the values exactly, including scheme, port and trailing path.

Group design before the claim is enabled

Decide which Entra groups will map to OpenBao policies and collect their object IDs now. OpenBao external group aliases are keyed on the group's objectId, not its display name, so renaming a group in Entra does not break the mapping, but a recreated group gets a new ID and needs a new alias. Users in more than 200 groups receive _claim_names and _claim_sources instead of a full groups list, so keep the mapped set small and confirm whether any user is likely to exceed that limit.

Two administrators, one change plan

The person who manages the Entra tenant and the person who manages OpenBao are often different people, and each change depends on the other. Agree the order of work, who makes each change, and who tests the login. Confirm the OpenBao version against the releases page before you start, so the steps match the release you run. Record the rollback path, such as keeping the existing auth method until a test user has logged in successfully.

OpenBao releases

How a login travels from Entra ID to an OpenBao token

The flow starts in a user's browser or CLI, which asks OpenBao to begin an OIDC login. OpenBao redirects the user to the Entra ID v2.0 sign-in page, and Entra returns an ID token whose groups claim lists group object IDs. OpenBao validates the token against keys published at the oidc_discovery_url, then matches those object IDs to external groups and aliases to attach policies. The tenant boundary marks Microsoft-hosted components, and the cluster boundary marks what you operate. Check the overage branch: users in more than 200 groups receive _claim_names and _claim_sources instead of a groups list, so group-based policy mapping does not apply to them.

Login path from the user through Entra ID to an OpenBao token, with the overage branch.

Configuring the Entra ID app registration and OpenBao JWT role

This sequence connects an Entra ID app registration to OpenBao's JWT/OIDC auth method, so users sign in with their Microsoft work accounts and receive policies based on their Entra group membership.

  1. Register the Entra ID application with redirect URIs

    An identity administrator in the Microsoft Entra admin center creates an app registration of the Web type. Add two redirect URIs: the CLI callback at and the OpenBao UI callback for your cluster address. Record the application (client) ID and create a client secret, storing the secret in your own secrets process rather than in a shared document. Done when the registration lists both redirect URIs and the client ID is recorded for the OpenBao configuration.

  2. Add the groups claim to the ID token

    In the app registration's token configuration, add an optional or group claim for security groups so that the ID token carries group identifiers. Choose which groups are emitted, such as only the groups intended for OpenBao policy mapping, and confirm the claim is returned to the application. Done when a sample sign-in shows a groups claim in the token, or when the overage behavior for users in more than 200 groups is documented for your tenant.

  3. Grant the Graph scope for group resolution

    In the app's API permissions, make sure the application can request the scope. OpenBao's guide sets this scope as oidc_scopes so that group data can be resolved when the groups claim is not complete. Grant admin consent if your tenant requires it. Done when the consent status shows granted and the scope appears in the OpenBao JWT role configuration plan.

  4. Enable and configure the JWT/OIDC auth method

    A platform engineer enables the JWT auth method in OpenBao and writes the provider configuration: oidc_discovery_url set to <tenant>/v2.0 with your Entra tenant ID, the client ID and client secret, the default role, and oidc_scopes set to the Graph scope. Set groups_claim to groups so OpenBao reads group membership from the token. Done when the configuration reads back correctly and a login attempt reaches the Microsoft sign-in page.

  5. Create external groups and aliases keyed on object IDs

    For each Entra group that should carry a policy, create an OpenBao external group, attach the policy or policies, and create a group alias that uses the Azure group's objectId as its name, with the JWT auth mount as the alias mount accessor. Keying on objectId rather than display name keeps mappings stable if a group is renamed. Done when each alias is listed under its external group with the correct mount accessor.

  6. Test a browser login and check group resolution

    Sign in through the OpenBao UI with a test user from each mapped group. Confirm in the token details or the entity view that the user is linked to the expected external groups and that the policies shown match the group design. Also test a user outside every mapped group to confirm they receive only the default policy. Done when each test account shows the expected groups and policies.

  7. Verify the CLI token carries the mapped policy

    From a workstation with the OpenBao CLI, run a JWT or OIDC login that opens the local callback at port 8250. Inspect the returned token with the token lookup command and confirm the policies match the test user's Entra group mappings. Attempt one read that the policy should allow and one that it should deny. Done when both results match the policy design, which closes the configuration sequence.

Mapping Entra groups, claims and OpenBao objects

This table pairs each Microsoft Entra element with its OpenBao counterpart, along with the value to record for each group. Read it as a checklist when you configure the OIDC role and external groups. The main takeaway is that mappings key on the group objectId, so a display name change in Entra does not break policy assignment.

Entra elementOpenBao object or settingWhat to record or confirm
Groups claim in the tokengroups_claim set to groupsAdd a groups claim to the app registration, then confirm it appears in a test token for a user in a known group.
Azure group objectIdExternal group alias nameRecord the objectId (a GUID), not the display name, and use it as the alias name exactly as issued.
Azure group display nameDocumentation onlyKeep for human review. It is not used as the mapping key, so renaming the group in Entra does not break the mapping.
Graph API permission scopeoidc_scopes set to the Graph .default scopeConfirm the scope is granted in the app registration and that admin consent is recorded for your tenant.
OpenBao external groupPolicy set attached to the groupRecord the policy names, the external group name and the group alias it links to, so reviewers can trace access.
Users in more than 200 groupsOverflow claims instead of the groups listExpect _claim_names and _claim_sources in the token. Confirm how your group membership is assigned before relying on the groups claim alone.
Custom signing keys from claims mappingNot supported for OIDC authenticationConfirm the app registration does not use this setting before you start the OpenBao configuration.

Handling users in more than 200 groups

For a user who belongs to 200 or fewer groups, Microsoft Entra ID places the full list of group identifiers in the groups claim of the token it issues. OpenBao reads that claim using the groups_claim setting, matches each object ID against the group aliases you created, and applies the policies attached to the matching external groups. No extra configuration is needed for this case beyond the groups claim and the Graph scope described earlier on this page. This is the path most users will take, and it is the one you should confirm first in a test tenant.

  • Token contents: Inspect the issued token for a representative user and confirm the groups array lists the object IDs you expect.
  • Alias match: Confirm each group alias name equals the Entra object ID, not the group display name, so the lookup succeeds.
  • Policy result: Log in through both the CLI and the UI and check that the resulting token carries the policies from the mapped external groups.
  • Nested groups: Confirm with your identity team whether nested membership is emitted in the claim for your tenant, since the list reflects what Entra returns.
  • Stable baseline: Record the group count for typical users so you have a reference when a user later crosses the limit.

Before rollout, check that the sample user's token and resulting OpenBao policies match your access design.

Security settings that matter for Entra ID login

Entra ID login gives OpenBao a direct path from your directory to policy, so the settings around the app registration determine who can sign in and what they can reach. The five controls below cover who can consent, which groups enter the token, where the client secret lives, how long sessions last, and what happens to users who match no group.

Restrict application consent

The OpenBao app registration is a directory object that users or admins can consent to. Decide whether end users may consent to apps at all, and if so, which apps they may consent to. Route the OpenBao registration through an admin consent workflow so that the Graph permission used for group lookups is reviewed by someone who owns OpenBao access. Check the consent settings in your tenant before the redirect URIs go live, because a consented app with broad permissions is hard to spot later.

Entra comparison

Limit groups to those used for policy

The groups claim carries every group the user belongs to, and OpenBao only needs the ones that map to external groups and policies. Create a dedicated set of security groups for OpenBao roles and do not map broad distribution lists or groups that exist for mail or Teams. Confirm with your Entra administrators which groups a typical user holds, because a user in more than 200 groups receives _claim_names and _claim_sources in place of the full list, and the policy mapping then fails silently for that user.

Keep the client secret out of config files

The client secret that OpenBao uses to exchange authorization codes is a long-lived credential that grants login for the app. Store it in a secure store, ideally a separate OpenBao or secrets manager path that only the administrators of the auth method can read, not in a plain configuration file or a shared runbook. Write down the rotation plan before go-live: who creates the new secret in Entra, when it is written to OpenBao, and how the old secret is revoked after cutover.

Use short token TTLs and bound audiences

Set the token lifetime on the OpenBao auth role to the shortest value that still lets engineers finish their work, and let the Entra session re-prompt for sign-in when that window closes. Confirm that the audience check in the role matches the client ID of the OpenBao registration, so tokens issued for other Entra apps cannot be replayed to log in. Review these values after each change to group mappings, because a long TTL keeps a removed group membership active until the token expires.

Avoid broad fallback policies

A user who signs in successfully but matches no group should receive no meaningful access. Do not attach a default policy to the auth method or to a catch-all external group, because a fallback policy grants every authenticated directory user some level of access. Test a sign-in by a user with no OpenBao group and confirm that the token carries only the policies you intend, and that the Entra group alias is keyed on the object ID of each group rather than on a display name.

Testing the login path before users depend on it

Test the Entra ID login path with dedicated test accounts before any production user signs in, and write the exact checks into the signed scope. The plan should cover each group case the policy design produces: a user in a single mapped group, a user in many groups, a user in no mapped group, and a user whose token triggers the overage behavior, where Entra ID omits the groups list and returns _claim_names and _claim_sources instead. Create one test account per case and record the Entra group objectIds each account belongs to, so every result can be traced back to the group alias that should match it.

For each account, run the login twice: once through the CLI and once through the UI. Confirm the resulting token carries exactly the policies the design assigns to that account's groups, using the token lookup output and the policy list on the entity. Treat any extra policy as a failure, even when the user can do their job, because it means the external group or alias is mapped too broadly. The overage case needs its own result: confirm whether the login gets the intended policies, gets none, or fails, and decide in advance which of those outcomes your design accepts. Note that the exact checks depend on the policies you design, so the expected policy set for each account must be agreed before testing starts.

Finish with a revocation test. Remove a test account from a mapped Entra ID group, then confirm the user loses the related access only after the token issued before the change expires, not immediately. Measure that window against the token lifetime configured in OpenBao and record it as an accepted operational limit. Repeat the removal for one account in the overage case so you know how group changes propagate when the groups list is not in the token. Keep these test accounts and results as evidence for your access review, and schedule the same tests again after any change to the app registration, claims or policies.

Common failures in Entra ID login and how to fix them

This table pairs each failure you are likely to see during OpenBao OIDC login with Microsoft Entra ID groups with its probable cause and fix. Read it by matching the symptom you observe to the row, then checking the cause column against your app registration, OpenBao role and token claims. Most failures trace back to the redirect URIs, the discovery URL tenant, or how group membership reaches OpenBao.

FailureSymptomCause and fix
Redirect URI mismatch (CLI)Entra returns an AADSTS error about the reply URL when the CLI login startsThe app registration lacks as a Web redirect URI. Add it exactly, including the port and path, then retry.
Redirect URI mismatch (UI)Sign-in from the OpenBao UI fails at the redirect after Entra authenticates the userThe UI callback URL OpenBao generates for your cluster is not registered as a Web redirect URI. Copy the value from the OpenBao role configuration and register it exactly.
Wrong tenant in discovery URLLogin fails with an issuer or invalid token error, or the discovery document loads from an unexpected tenantThe oidc_discovery_url points to a different tenant ID than the one that issued the token. Set it to <tenant>/v2.0 using the tenant that owns the app registration.
Missing groups claim in tokenLogin succeeds but no identity group membership is applied and group-based policies are missingThe groups claim was not added to the app registration's token configuration, so the ID token carries no groups. Add the groups claim and confirm groups_claim is set to groups in the OpenBao role.
Missing Graph scopeGroup lookup returns no groups or the role reports no group data, even with the claim configuredoidc_scopes does not include Add the scope to the role, then sign in again so a new token is issued.
Overage at more than 200 groupsUsers in many groups get no policy mapping, and the token shows _claim_names and _claim_sources instead of a groups listEntra omits the full list above 200 groups. Limit group assignment to the groups OpenBao uses, or plan a group lookup path. Confirm the current overage behavior in Microsoft's documentation before choosing.
Group alias keyed on display nameUsers sign in but do not receive the policies on the external group, and the alias does not match the tokenThe alias name was set to the Azure group's display name rather than its objectId. Recreate the alias using the group's objectId from Entra so it matches the groups claim value.
Custom signing keys breaking validationLogin fails at token validation after the app was configured with claims mapping or custom signing keysOpenBao does not support OIDC authentication for applications with custom signing keys from claims mapping. Use the default signing keys on the app registration used for OpenBao.

Questions buyers ask before hiring help with Entra ID login

What drives the effort of an Entra ID login for OpenBao?

The effort is driven mostly by how many groups need to map to policies, how those policies are designed, and how your tenant governs app registrations and group creation. A small set of groups mapped to a few policies is a short configuration task. Effort rises when you have many groups, nested or dynamic group membership, several OpenBao namespaces with separate policy sets, or a rule that every access grant must be reviewed. Overage handling also matters. Users in more than 200 groups receive _claim_names and _claim_sources instead of the full groups list, so you need a plan for that case before go-live. Ask any partner to size the work from your group count, policy list and tenant approval steps.

Can our team set up OpenBao Entra ID login alone?

Yes, a team with Entra ID and OpenBao experience can follow OpenBao's Azure AD OIDC guide, which covers the app registration, the groups claim, oidc_discovery_url, external groups and group aliases keyed on object IDs. The guide does not settle your policy design, your handling of the 200-group overage, or how your tenant approves new app permissions. Teams that lack one of those skills, or that need a repeatable setup for several clusters, often take the outside help. Confirm that your engineers can test sign-in for both the CLI callback and the UI before you decide.

What do we need from the Entra ID admin and the OpenBao admin?

The Entra ID admin registers the application, sets the Web redirect URIs for the CLI and the UI, adds the groups claim, and grants the Microsoft Graph scope that the guide specifies. They also confirm that the tenant allows the app and that group object IDs can be read. The OpenBao admin creates the JWT/OIDC auth method, sets the discovery URL and groups_claim, defines external groups and group aliases, and attaches policies. Both admins should agree on who owns the group list, because each group object ID becomes an alias in OpenBao. Note that applications using custom signing keys from claims mapping are not supported for OIDC authentication, so check that setting before the app is registered.

How long does a pilot take?

The length of a pilot depends on scope rather than on a standard duration. A pilot covering one OpenBao cluster, one Entra tenant and a handful of groups is far shorter than one covering several clusters, multiple namespaces and an approval workflow for tenant changes. Ask for a written timeline tied to a written scope. The schedule should name the approval steps in your tenant, the group clean-up you need, and the test cases for overage and revoked access. DeployOpen agrees scope, deliverables and timelines in writing before work starts, and it does not publish a fixed duration.

Do we need AD FS or Entra Connect for a hybrid organization?

Not for the OpenBao OIDC path itself. OpenBao talks to Entra ID as an OIDC provider, so the sign-in works for accounts that exist in the Entra tenant. If your users live in on-premises Active Directory, Microsoft's comparison notes that existing organizations use Microsoft Entra Connect to sync identities to Entra ID, and that Active Directory needs a federation system such as AD FS for SaaS apps. Whether you need Entra Connect or AD FS depends on how your identities reach the tenant today, so confirm that with your identity team before scoping the work.

Does on-premises Active Directory add licensing or lifecycle work?

Only if on-premises Active Directory is in scope. If the work covers Entra ID sign-in only, Windows Server licensing and lifecycle facts do not change the OpenBao integration. If you plan to run Active Directory Domain Services, Microsoft licenses Windows Server 2025 per core with a minimum of 16 cores per server, and both Standard and Datacenter editions need a Windows Server Client Access License for each user or device. Microsoft's pricing page gives a suggested price for 16 core licenses, but it notes that prices vary by region, so request your own quote. Windows Server 2022 mainstream support ended on October 14, 2026, so confirm the support status of any server you plan to keep.

What should a quote for this work include?

A useful quote lists the scope in writing: the Entra tenant and app registrations, the OpenBao clusters and namespaces, the number of groups and policies, the handling of the 200-group overage, and any Entra Connect or AD FS work. It should separate one-time setup from recurring costs such as retesting after group changes or OpenBao upgrades. Ask who performs the tenant changes, who approves them, what testing is included, and what documentation you receive. Ask how changes to the group list after go-live are handled and whether they are covered by a retainer or a new scope.

What breaks most often after the login works?

The most common problems appear after go-live, when group membership changes. Users added to many groups can hit the overage behavior and lose the groups list they depend on. Group aliases keyed on object IDs stop matching when a group is deleted and recreated, because the new group has a new object ID. Policy drift also happens when new groups are created in Entra ID without a matching external group in OpenBao. Plan a review of group changes, a test for an overage user, and an alert or report for failed logins.

How DeployOpen scopes and delivers this integration

DeployOpen plans, implements and tests the OpenBao OIDC login with Microsoft Entra ID inside your own infrastructure, so the OpenBao cluster, its auth mount, the Entra app registration and the group mapping are all reviewed by your identity and security teams. The scope is agreed in writing before work starts, covering which tenants and groups are in play, which OpenBao policies each group maps to, whether the CLI and UI both need sign-in, and how the work is tested. A quote follows from that written scope, so the decisions that drive effort, such as the number of groups per user and the number of environments, are settled first.

The deliverables typically cover the app registration settings, the OIDC auth configuration, the external groups and group aliases keyed on Entra object IDs, a test plan that signs in as users in several groups including one above the 200-group overage limit, and runbook notes for changing group membership. Timelines are agreed in the same document. Your own team should confirm tenant ownership, who can grant admin consent for the Graph scope, and whether a change window exists for the production cluster, since those dependencies usually set the schedule more than the configuration itself.

DeployOpen does not act as a Microsoft Entra ID or OpenBao vendor partner, reseller or certified provider. Support and retainers are available for later work, such as adding groups, rotating the client secret, moving to a new OpenBao minor version or re-testing after a Microsoft change, and these are scoped separately in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.