# Azure AD Enterprise connection profile picture

**URL:** <https://community.auth0.com/t/azure-ad-enterprise-connection-profile-picture/94897>\
**Category:** Get Help\
**Tags:** azure-ad-enterprise-connection, connections\
**Created:** [November 22, 2022, 8:53am UTC](https://community.auth0.com/t/azure-ad-enterprise-connection-profile-picture/94897 "2022-11-22T08:53:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curiious](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/curiious/32/33650_2.png) [@Curiious](https://community.auth0.com/u/Curiious)\
**Post date:** [November 22, 2022, 8:53am UTC](https://community.auth0.com/t/azure-ad-enterprise-connection-profile-picture/94897/1 "2022-11-22T08:53:36Z")

</div>

Hi there, I’m currently seeking to reference a users profile picture when they login via an Azure AD enterprise connection.

I’ve got extended profile enabled, and the profile is being accessed correctly, with the exception of the profile picture, which is always being returned as a gravatar link.

Based on some research, I’ve come across the following link

> [@How do I get the user's picture, manager and direct reports from Azure AD?](https://community.auth0.com/t/how-do-i-get-the-users-picture-manager-and-direct-reports-from-azure-ad/6129):
>
> The user profile returned from an Azure AD connection does not include the user’s picture, but I see a photo is available in Azure. Is it possible to get it? Also, the profile does not include the user’s manager or direct reports, even when checking the Extended attributes option in the global configuration for Azure AD connections.

This all makes sense, however in my login action, I don’t have access to an access token (`event.user.identities[0].access_token`). I’m guessing this might be because I’m using MS Identity Platform v2.

Could someone advise what the best way forward is here?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 22, 2022, 6:15pm UTC](https://community.auth0.com/t/azure-ad-enterprise-connection-profile-picture/94897/2 "2022-11-22T18:15:12Z")

</div>

Hi @Curiious !  
I did a quick search over Azure AD’s documentation and things seem to be in the same state as when I wrote the article 5 years ago: Azure AD doesn’t provide the standard `picture` claim with a URL in the ID Token (or even in the profile endpoint), as others identity providers do, so Auth0 falls back to the gravatar picture.  
You guess correctly that the MS Identity Platform v2 implementation for Azure AD connections does not store the AAD access token for you to use. So if you really need the picture the only option is to go back to the “Azure Active Directory (v1)” strategy and fetch the picture in a rule as I described in the linked article.

---

<div class="post-metadata">

**Author:** ![Curiious](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/curiious/32/33650_2.png) [@Curiious](https://community.auth0.com/u/Curiious)\
**Post date:** [November 23, 2022, 4:00am UTC](https://community.auth0.com/t/azure-ad-enterprise-connection-profile-picture/94897/3 "2022-11-23T04:00:11Z")

</div>

Ok, thanks for the clarification!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [November 23, 2022, 3:27pm UTC](https://community.auth0.com/t/azure-ad-enterprise-connection-profile-picture/94897/4 "2022-11-23T15:27:01Z")

</div>

Thanks for helping on this one Nico!

---

<div class="post-metadata">

**Author:** ![Curiious](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/curiious/32/33650_2.png) [@Curiious](https://community.auth0.com/u/Curiious)\
**Post date:** [December 6, 2022, 11:49pm UTC](https://community.auth0.com/t/azure-ad-enterprise-connection-profile-picture/94897/5 "2022-12-06T23:49:51Z")

</div>

Hi Folks, just jumping back in here before this closes.

I’ve changed the integration back to Azure Active Directory (v1) but the token is still not exposed. In @nicolas_sabena 's example, he’s using a rule to access the access\_token. Our implementation is an action. Is it possible to do this via an action? Its looks like actions are the focus of development going forward, and would prefer to not revert to a rule if possible.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 20, 2022, 11:50pm UTC](https://community.auth0.com/t/azure-ad-enterprise-connection-profile-picture/94897/6 "2022-12-20T23:50:16Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
