AzureAD / microsoft-authentication-library-for-python

Microsoft Authentication Library (MSAL) for Python makes it easy to authenticate to Microsoft Entra ID. General docs are available here https://learn.microsoft.com/entra/msal/python/ Stable APIs are documented here https://msal-python.readthedocs.io. Questions can be asked on www.stackoverflow.com with tag "msal" + "python".
https://stackoverflow.com/questions/tagged/azure-ad-msal+python
Other
816 stars 203 forks source link

[Bug] Validate Azure access token in Django Rest API and call graph API #716

Open Shriyanshmit opened 4 months ago

Shriyanshmit commented 4 months ago

Hello Team,

Form Angular application using MSAL, I login to azure and receive accessToken. Now to pull data from API I am passing access token as bearer in header of API. Now please let me know how I can validate/authorize this token in backend Django rest api.

Do we have any in built function or module that I need to install and validate? If not please let me know how I can validate/authorize my token and call graph api to get additional information of user.

localden commented 3 months ago

MSAL itself is a token acquisition library, not a token validation one, so you would need to look for alternative solution when it comes to token validation.

@rayluo is this something that PyJWT would fit the bill for?