# Prevent picture from social identity provider from being saved to user account

**URL:** <https://community.auth0.com/t/prevent-picture-from-social-identity-provider-from-being-saved-to-user-account/60894>\
**Category:** Get Help\
**Tags:** social-connections, auth0\
**Created:** [April 11, 2021, 10:49am UTC](https://community.auth0.com/t/prevent-picture-from-social-identity-provider-from-being-saved-to-user-account/60894 "2021-04-11T10:49:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdsedmundo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rdsedmundo/32/14574_2.png) [@rdsedmundo](https://community.auth0.com/u/rdsedmundo)\
**Post date:** [April 11, 2021, 10:49am UTC](https://community.auth0.com/t/prevent-picture-from-social-identity-provider-from-being-saved-to-user-account/60894/1 "2021-04-11T10:49:48Z")

</div>

I’m using the google-oauth2 integration and I couldn’t find a way of preventing the user profile picture to make its way to Auth0. Creating a rule is not sufficient because that only modifies the response for the applications, but the Auth0 dashboard still has the picture and shows it.

The only way I found was to create a custom Google OAuth connection, which I have to say is annoying as Auth0 simply should have let me choose which claims I wanted from the social provider.

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [April 12, 2021, 12:15pm UTC](https://community.auth0.com/t/prevent-picture-from-social-identity-provider-from-being-saved-to-user-account/60894/3 "2021-04-12T12:15:45Z")

</div>

Hi @rdsedmundo,

Welcome to the Community!

You can specify which fields should not be stored in Auth0 by adding attributes to the connection’s DenyList: [https://auth0.com/docs/security/denylist-user-attributes](https://auth0.com/docs/security/denylist-user-attributes)

1. Get an Access Token for the Management API. Since this is a one-time task, you can use the token from the API Explorer. Go to **Applications \> APIs \> Auth0 Management API** and go to the **API Explorer** tab. Copy the Access Token.
2. Go to the [Management API docs](https://auth0.com/docs/api/management/v2) and click on the **SET API TOKEN** button and paste the Access Token you copied from the API Explorer.
3. Get the Connection IDs of all of the identity providers that you want to update using the [GET](https://auth0.com/docs/api/management/v2?_ga=2.224945562.1847387816.1618225160-1595415333.1607347674#!/Connections/get_connections)[/api/v2/connections](https://auth0.com/docs/api/management/v2?_ga=2.224945562.1847387816.1618225160-1595415333.1607347674#!/Connections/get_connections) endpoint. The connection ID will look something like `con_4HWnfgic03J1b1XO`.
4. Update each connection using the [PATCH](https://auth0.com/docs/api/management/v2?_ga=2.224945562.1847387816.1618225160-1595415333.1607347674#!/Connections/patch_connections_by_id)[/api/v2/connections/{id}](https://auth0.com/docs/api/management/v2?_ga=2.224945562.1847387816.1618225160-1595415333.1607347674#!/Connections/patch_connections_by_id) endpoint. One connection at a time, add the connection ID that you retrieved in that last step, and update the connection’s DenyList:

```auto
{
  "options": {
    "non_persistent_attrs": ["picture"]
  }
}

```

When a user logs in with the connection, the picture will not persist in Auth0.

---

<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:** [April 27, 2021, 12:16pm UTC](https://community.auth0.com/t/prevent-picture-from-social-identity-provider-from-being-saved-to-user-account/60894/4 "2021-04-27T12:16:35Z")

</div>

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