[Bug] Validate Azure access token in Django Rest API and call graph API
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.
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?
I have been reading the docs for the past couple of days trying to figure out this same usecase. They are very unclear on this topic.
Token validation itself is out-of-scope for MSAL, as it is just a token acquisition library. PyJWT might be a start here.