Skip to content

docs(microsoft): document batchGroupLookups option#216

Open
XDanny322 wants to merge 3 commits into
dexidp:mainfrom
XDanny322:main
Open

docs(microsoft): document batchGroupLookups option#216
XDanny322 wants to merge 3 commits into
dexidp:mainfrom
XDanny322:main

Conversation

@XDanny322

Copy link
Copy Markdown

The Microsoft connector's group-name resolution sends every group ID a user
belongs to in a single request to Microsoft Graph's
directoryObjects/getByIds endpoint. That endpoint caps requests at 1000 IDs,
so users in more than 1000 groups fail to log in.

dexidp/dex#4833 fixes this by adding a batchGroupLookups config option that
splits the lookup into batches of 1000 IDs. It's opt-in (default off) rather
than always-on.

@XDanny322 XDanny322 force-pushed the main branch 3 times, most recently from 95a1c48 to dddb220 Compare July 7, 2026 15:10
…and configuration details

xref dexidp/dex#4833

Signed-off-by: Danny Lai <xdanny322@gmail.com>

@matheuscscp matheuscscp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @XDanny322!

Comment thread content/docs/connectors/microsoft.md Outdated
Comment on lines +213 to +223
By default, dex resolves group ids to group names with a single request to
the Microsoft Graph API. Microsoft Graph's
[`directoryObjects/getByIds`](https://learn.microsoft.com/en-us/graph/api/directoryobject-getbyids)
endpoint caps that request at 1000 ids, so a user who is a member of more
than 1000 groups will fail to log in.

Setting the `batchGroupLookups` (boolean) configuration option splits the
lookup into batches of 1000 group ids, supporting users with larger group
memberships. This is opt-in because it trades that login failure for
additional requests to the Microsoft Graph API — one extra request per 1000
groups a user belongs to — which may not be desirable for every deployment.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like slop, we could document everything here in 3~4 lines

@XDanny322 XDanny322 Jul 10, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, i tighten this a bit. Added the comment inline, within the same "group" archor. Also took this chance to add the header size note.

Looks something like this.

image

Move the >1000 groups caveat next to groupNameFormat since it only
applies to name resolution, and note that resolving large group counts
can produce a JWT big enough to need ingress/gateway header buffer
tuning.

Signed-off-by: Danny Lai <xdanny322@gmail.com>

@matheuscscp matheuscscp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @XDanny322, the example was good but the two paragraphs were together too large

Show a concrete config snippet demonstrating batchGroupLookups: true
alongside the prose explaining when it's needed.

Signed-off-by: Danny Lai <xdanny322@gmail.com>
@XDanny322

Copy link
Copy Markdown
Author

I added the example back, but left it meshed into the exist groupNameFormat doc - as thats likely the place people would need / notice this change.

resulting:

image

Thanks!

@matheuscscp matheuscscp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

Thanks @XDanny322!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants