access_token vs id_token #51
-
I'm struggling a little bit trying to make sure that my application covers the full standard. I have found that certain Azure configurations do not always return an id_token. With this I am trying to implement a solution where I use the access_token. In doing so, I'm not having a lot of luck with Apache and mod_oauth2 allowing me to pass the access token in the request and authorize access. This configuration works if I pass the id_token. So in Apache I have configured my location as such
`
Is it not possible to use access_token to authenticate? Do I need to configure the location different? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
see this page, https://learn.microsoft.com/en-us/answers/questions/793793/azure-ad-validate-access-token also including the warning about not relying on the MS specifics, for sure the signing key location is different from the ID token/OIDC signing key location; the access token JWT may also be encrypted; you'll also need to use OpenIDC/liboauth2@387419f if you want to find out the exact cause of the |
Beta Was this translation helpful? Give feedback.
-
In regards to the article, I am probably missing something but I have configured the .well-known against the v2.0 like the question, and similar to the response from Microsoft I'm using the keys endpoint as they describe. The other thing to note, the access_token and id_token are both JWTs. Also, am I correct that no mod_oauth2 binaries have been created yet for this? I'll want to build that and mod_oauth2 myself to use this at the present time? |
Beta Was this translation helpful? Give feedback.
-
The error I get with the updated lib_auth I'm done a little searching online, appears it could be SSL related, but I'm not getting lot of info that makes sense to me. |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
Hi,
i was able to solve this, it was an issue with the scope that i was using to fetch the token. Instead of using api://XXXXXXX/.default i was using https://graph.microsoft.com/.default to fetch the token,
After using the token with correct scope the validation and authorization is now working.