I’m having difficulties finding documentation for auth0 and microsoft graph integration. There are a lot if similar posts on this site with no answers, so I am unsure if this is possible at all.
My end goal is to have a SPA that can login with a microsoft profile to auth0 (connected to azure ad). Then I want my app to get a token for microsoft graph and do some api calls.
As I’ve understood it so far, auth0 does not allow you to get the access token to different identity providers in a front end application, but rather that they should use a proxy to get this token. My flow therefore is:
- I login with a SPA auth0 app (using a microsoft identity)
- This is then used to authenticate to a backend server using a api registration in auth0
- The backend has its seperate machine-to-machine app in auth0
- Backend api uses this seperate app to get access token to auth0 management api
- Current user is fetched (based on the logged in user from front end app login) from management api,
- Here i find an access token under the azure identity (if I do the same in the front end, the access tokens are omitted)
- Token does not work to call graph, I am unsure of where to send it next.
I am aware that the above is probably completely wrong, that’s why I am here
My questions are:
- Is it even possible to get an access token for microsoft graph starting from a login to auth0 in the way I want it to. If not, can it be done from a backend? 2) Does anyone have a link that discusses this, ideally with some code samples.