New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oauth2 - AzureAD - Get User Picture #222
Comments
Hi @Clem- we don't currently support making external requests via AJAX in a lambda function. If AzureAD does not have an option to return the picture as a URL to an image file then it may not be possible to retrieve the user's image. We may explore adding AJAX support to the Lambda in the future. |
Thank for your answer. I think that requests in Lambda is really something missing (that Auth0 have, btw). So, is there a way to pass the access token from the IdentityProvider to my App throught FusionAuth in order to make the request to the microsoft API in the app? Thanks |
@Clem- you can technically make requests from the Lambda's, but just not using The key is that for FusionAuth to display the image properly, you must set the Here's an example of Nashorn engine using Java classes to make a HTTP request: https://gist.github.com/billybong/a462152889b6616deb02 For your other questions, once the user logs in, you'll have their access token and you can turn right around and update the User via the |
@voidmain is correct, however FusionAuth currently blocks all access to the JDK within a lambda. If we were to support AJAX it would probably make sense for us to expose a helper class or perhaps upgrade the JavaScript engine to support |
I would assume this will work now that you can make an HTTP request within a lambda function? Available in version 1.35.0. If anyone wants to confirm and let us know, that would be great. |
Please re-open if this is still not possible. |
Oauth2 - AzureAD - Get User Picture
Description
I successfully added Azure AD as an Identity Provider of FusionAuth and I'm getting the user profile in the JWT.
Howerver, the
picture
property of the profile is set tohttps://graph.microsoft.com/v1.0/me/photo/$value
.I would have to make a request in a Lambda in order to populate the user profile with the raw data buffer, but it does not seem possible.
How can I make that request to fetch the picture and send it back to the user profile?
Thanks
The text was updated successfully, but these errors were encountered: