Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
6.76k stars 878 forks source link

Azure AD OAuth - incorrect endpoint for getting current logged-in user data #415

Closed triantafillos closed 11 months ago

triantafillos commented 11 months ago

The correct endpoint to use from MS Graph API to get the current user's data is https://graph.microsoft.com/v1.0/me. Instead, in oauth_providers.py (line 177) it is incorrectly set to https://graph.microsoft.com/v1.0/users/me.

willydouhard commented 11 months ago

@tpatel can you take a look a this?

tpatel commented 11 months ago

Thanks for bringing this issue up.

From testing the API, it looks like both option work. From the documentation side, it looks like https://graph.microsoft.com/v1.0/me is indeed the correct option.

Would you be interested in making this change? If not I'll get it done tomorrow!

triantafillos commented 11 months ago

Thanks @tpatel! I have opened a PR -> https://github.com/Chainlit/chainlit/pull/422.