LibreChat/api/strategies
Airam Hernández Hernández aee1ced817
🪙 fix: Resolve Azure AD Group Overage via OBO Token Exchange for OpenID (#12187)
When Azure AD users belong to 200+ groups, group claims are moved out of
the ID token (overage). The existing resolveGroupsFromOverage() called
Microsoft Graph directly with the app-audience access token, which Graph
rejected (401/403).

Changes:
- Add exchangeTokenForOverage() dedicated OBO exchange with User.Read scope
- Update resolveGroupsFromOverage() to exchange token before Graph call
- Add overage handling to OPENID_ADMIN_ROLE block (was silently failing)
- Share resolved overage groups between required role and admin role checks
- Always resolve via Graph when overage detected (even with partial groups)
- Remove debug-only bypass that forced Graph resolution
- Add tests for OBO exchange, caching, and admin role overage scenarios

Co-authored-by: Airam Hernández Hernández <airam.hernandez@intelequia.com>
2026-03-15 19:09:53 -04:00
..
appleStrategy.js 🧹 chore: Cleanup Logger and Utility Imports (#9935) 2025-10-01 23:30:47 -04:00
appleStrategy.test.js 🛂 feat: Social Login by Provider ID First then Email (#10358) 2025-11-05 09:20:35 -05:00
discordStrategy.js 🍎 feat: Apple auth (#5473) 2025-01-31 09:49:09 -05:00
facebookStrategy.js 🍎 feat: Apple auth (#5473) 2025-01-31 09:49:09 -05:00
githubStrategy.js feat: added Github Enterprise SSO login (#5621) 2025-02-03 15:30:02 -05:00
googleStrategy.js 🧠 feat: Reasoning UI for Agents (#5904) 2025-02-15 18:52:29 -05:00
index.js 🪪 feat: Add OPENID_EMAIL_CLAIM for Configurable OpenID User Identifier (#11699) 2026-02-25 22:31:03 -05:00
jwtStrategy.js 🧑‍💻 refactor: Secure Field Selection for 2FA & API Build Sourcemap (#9087) 2025-08-15 18:55:49 -04:00
ldapStrategy.js 📧 fix: Case-Insensitive Domain Matching (#9868) 2025-09-27 21:20:19 -04:00
ldapStrategy.spec.js 📧 fix: Case-Insensitive Domain Matching (#9868) 2025-09-27 21:20:19 -04:00
localStrategy.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
openIdJwtStrategy.js 📌 fix: Populate userMessage.files Before First DB Save (#11939) 2026-02-26 09:16:45 -05:00
openIdJwtStrategy.spec.js 🪪 feat: Add OPENID_EMAIL_CLAIM for Configurable OpenID User Identifier (#11699) 2026-02-25 22:31:03 -05:00
openidStrategy.js 🪙 fix: Resolve Azure AD Group Overage via OBO Token Exchange for OpenID (#12187) 2026-03-15 19:09:53 -04:00
openidStrategy.spec.js 🪙 fix: Resolve Azure AD Group Overage via OBO Token Exchange for OpenID (#12187) 2026-03-15 19:09:53 -04:00
process.js 🛂 feat: Social Login by Provider ID First then Email (#10358) 2025-11-05 09:20:35 -05:00
process.test.js 🛂 feat: Social Login by Provider ID First then Email (#10358) 2025-11-05 09:20:35 -05:00
samlStrategy.js 📧 fix: Case-Insensitive Domain Matching (#9868) 2025-09-27 21:20:19 -04:00
samlStrategy.spec.js refactor: Replace tiktoken with ai-tokenizer (#12175) 2026-03-10 23:14:52 -04:00
socialLogin.js 🛂 feat: Social Login by Provider ID First then Email (#10358) 2025-11-05 09:20:35 -05:00
socialLogin.test.js 📬 refactor: Normalize Email Handling in User Methods (#10743) 2025-12-01 09:41:25 -05:00
validators.js 🔐 feat: Add Configurable Min. Password Length (#9315) 2025-08-27 16:30:56 -04:00
validators.spec.js 🔐 feat: Add Configurable Min. Password Length (#9315) 2025-08-27 16:30:56 -04:00