# Identity profileData Field Not in Management API UserIdentity

**URL:** <https://community.auth0.com/t/identity-profiledata-field-not-in-management-api-useridentity/78948>\
**Category:** Get Help\
**Tags:** golang\
**Created:** [February 25, 2022, 9:11pm UTC](https://community.auth0.com/t/identity-profiledata-field-not-in-management-api-useridentity/78948 "2022-02-25T21:11:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![davew](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@davew](https://community.auth0.com/u/davew)\
**Post date:** [February 25, 2022, 9:11pm UTC](https://community.auth0.com/t/identity-profiledata-field-not-in-management-api-useridentity/78948/1 "2022-02-25T21:11:21Z")

</div>

We have a rule in place that copies social profileData (`given_name`, `picture`, etc…) from the social identity to the user profile. However, because this is a rule, it’s only executed when the user authenticates.

I would like to copy this profileData in the same way when retrieving a user using the management API, so that I can have an API return user data that would have the same values as returned to the user during authentication.

This profileData is visible in the Auth0 console user page, and the golang SDK User has UserIdentity fields, but profileData is not included ([auth0/user.go at 1cc7cea411863817d4c5392f54a87a87edc02dda · go-auth0/auth0 · GitHub](https://github.com/go-auth0/auth0/blob/1cc7cea411863817d4c5392f54a87a87edc02dda/management/user.go#L174)).

Can I get identity profile data using the management API?  
If not, what’s the right way to get this profileData for all users in a backend way?

-Dave

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [February 26, 2022, 12:42am UTC](https://community.auth0.com/t/identity-profiledata-field-not-in-management-api-useridentity/78948/3 "2022-02-26T00:42:45Z")

</div>

Hi @davew ,

Welcome to Auth0 Community!

I understand that you want to retrieve user profile data in the Management API. Is [this](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id) what you are looking for?

---

<div class="post-metadata">

**Author:** ![davew](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@davew](https://community.auth0.com/u/davew)\
**Post date:** [February 28, 2022, 1:57pm UTC](https://community.auth0.com/t/identity-profiledata-field-not-in-management-api-useridentity/78948/4 "2022-02-28T13:57:53Z")

</div>

Hi Lihua, I’m specifically looking for the `profileData` field within the User `identities` field. From the Management API Users endpoint, I get back data like this under the `identities` field:

```auto
  "identities": [
    {
      "connection": "Initial-Connection",
      "user_id": "507f1f77bcf86cd799439020",
      "provider": "auth0",
      "isSocial": false
    },
    {
      "connection": "google-oauth2",
      "user_id": "abc123",
      "provider": "google-oauth2",
      "isSocial": true
    }
  ],

```

However, in the Auth0 console User page, I see this data under `Identity Provider Attributes > Identities`:

```auto
  "identities": [
    {
      "connection": "Initial-Connection",
      "user_id": "507f1f77bcf86cd799439020",
      "provider": "auth0",
      "isSocial": false
    },
    {
      "connection": "google-oauth2",
      "user_id": "abc123",
      "provider": "google-oauth2",
      "isSocial": true,
      "profileData": {
         "family_name": "some name",
         "picture": "https://cdn.googleusercontent.com/user/abc123"
      }
    }
  ],

```

Can I access this `profileData` field with the Management API? If so, how?

-Dave

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [March 3, 2022, 12:47am UTC](https://community.auth0.com/t/identity-profiledata-field-not-in-management-api-useridentity/78948/5 "2022-03-03T00:47:58Z")

</div>

I tested user account linking. The response from the Management API is exactly the same as the details on the Auth0 dashboard.

Here are the steps I did on the Auth0 dashboard.

1. Install the Auth0 Account Link Extension by following the steps [here](https://auth0.com/docs/customize/extensions/account-link-extension)

2. Find a user account which has google-oauth2 connection, let’s call it [abc@gmail.com](mailto:abc@gmail.com).

3. Getting Started → click on “Try it out”

4. Click on “Sign Up” and enter [abc@gmail.com](mailto:abc@gmail.com) and the password

5. The Account Linking window will be popped up.

6. click on “Continue” to link the two accounts.

7. get the identifier id and search it in the Management API [call](https://auth0.com/docs/api/management/v2?_ga=2.4287028.662248092.1645985407-33930111.1644863583&_gl=1*wv23f8*rollup_ga*MzM5MzAxMTEuMTY0NDg2MzU4Mw..*rollup_ga_F1G3E656YZ*MTY0NjI2NDU0MS42NS4xLjE2NDYyNjc1MDcuMTI.#!/Users/get_users_by_id)

8. the profiledata is visible and matches the details on the Auth0 dashboard.

Could you please try with the same steps and let us know how it goes? Thanks!

---

<div class="post-metadata">

**Author:** ![davew](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@davew](https://community.auth0.com/u/davew)\
**Post date:** [March 7, 2022, 3:24am UTC](https://community.auth0.com/t/identity-profiledata-field-not-in-management-api-useridentity/78948/6 "2022-03-07T03:24:14Z")

</div>

It looks like the key `profileData` is returned by the REST API, but not by the golang SDK.  
I’ve opened a PR to add the missing functionality: [Add profileData key to UserIdentity by davidwarshaw · Pull Request #33 · auth0/go-auth0 · GitHub](https://github.com/auth0/go-auth0/pull/33)

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [February 1, 2023, 6:55pm UTC](https://community.auth0.com/t/identity-profiledata-field-not-in-management-api-useridentity/78948/7 "2023-02-01T18:55:21Z")

</div>


