Auth0 Home Blog Docs

Users with the same user_id are impossible to update correctly

bug
google

#1

When we get the users by emails, we noticed that we got some users with the same user_id returned.

For example myself:
when I http GET https://easymile-sitecc.eu.auth0.com/api/v2/users-by-email?email=my_email@ddress.com

I get a lot of responses with the same user_id

[
  {
    "email": "my_email@ddress.com",
    "identities": [
      {
        "connection": "my-connection-1",
        "provider": "google-oauth2",
        "user_id": "my-google-oauth2-id"
      }
    ],
    "user_id": "google-oauth2|my-google-oauth2-id"
  },
  {
    "email": "my_email@ddress.com",
    "identities": [
      {
        "connection": "my-completely-other-connection",
        "provider": "google-oauth2",
        "user_id": "my-google-oauth2-id"
      }
    ],
    "user_id": "google-oauth2|my-google-oauth2-id"
  }
]

In this little example, if I want to update the first, I can’t because when I perform an http GET on ‘https://easymile-sitecc.eu.auth0.com/api/v2/users/google-oauth2|my-google-oauth2-id’ I only get one result, and it’s not the same one when I do a PATCH (For updating app_metadata in my case)

What I want to do is be able to update a user for a particular connection, and that does not seem to be possible.

Am I missing something obvious here?
I tried to use the application (client_id/secret) associated to the connection I wanted to update but the same issue is here.

Regards,
Michaël Bitard