Forwarding Microsoft EntraID (Azure AD) JWTs from LibreChat's 'Reuse Token' Flow to a Custom FastAPI Endpoint #8216
Sanady
started this conversation in
Feature Requests & Suggestions
Replies: 1 comment 1 reply
-
+1 I’m also interested in this. I’ve went through documentation and it seems like there are header placeholders for various user properies (found in MCP headers docs). @danny-avila Is there a way to create one for JWT token as well? I’m pretty sure having this feature would help adopting LibreChat in orgs running on Azure. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How to pass Entra ID JWT tokens from LibreChat "Reuse Token" to custom endpoint API?
Context
I'm trying to integrate LibreChat with a custom endpoint API that needs to authenticate users using Entra ID (Azure AD) JWT tokens. I've configured LibreChat with Microsoft authentication and enabled the "Reuse Token" feature, expecting to receive the original JWT access/refresh tokens in my custom endpoint.
Problem
While I can see in the browser's network tab that LibreChat successfully receives the proper Entra ID JWT tokens during authentication, when these tokens reach my custom endpoint API, they appear to be different - seemingly opaque tokens rather than the original JWTs.
What I've tried
Questions
Configuration Details
Expected Behavior
My custom endpoint should receive the original JWT access token (and optionally refresh token) issued by Entra ID, allowing it to:
Actual Behavior
The token received by my custom endpoint appears to be an opaque/session token rather than the original JWT, preventing proper validation and user identification.
Has anyone successfully implemented this flow? Any guidance on the correct configuration or token handling would be greatly appreciated!
Already discussed in issue #7769
Beta Was this translation helpful? Give feedback.
All reactions