# How to Create a password change ticket in secondary identity?

**URL:** <https://community.auth0.com/t/how-to-create-a-password-change-ticket-in-secondary-identity/90575>\
**Category:** Get Help\
**Tags:** api, password-reset, auth0\
**Created:** [September 14, 2022, 8:53am UTC](https://community.auth0.com/t/how-to-create-a-password-change-ticket-in-secondary-identity/90575 "2022-09-14T08:53:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pop](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pop/32/39917_2.png) [@pop](https://community.auth0.com/u/pop)\
**Post date:** [September 14, 2022, 8:53am UTC](https://community.auth0.com/t/how-to-create-a-password-change-ticket-in-secondary-identity/90575/1 "2022-09-14T08:53:51Z")

</div>

use Account Link at primary identity is google, secondary identity is auth0.  
want get password change ticket at secondary identity.  
use this api: [Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Tickets/post_password_change)  
try connection\_id and email send but error messaged “The user does not exist”.  
how to create a password change ticket?

---

<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:** [September 15, 2022, 12:00am UTC](https://community.auth0.com/t/how-to-create-a-password-change-ticket-in-secondary-identity/90575/3 "2022-09-15T00:00:38Z")

</div>

Hi @pop ,

Welcome to the Auth0 Community!

I understand that you want to create a password change ticket for the secondary id which is an auth0 id.

Could you please try below scripts?

```auto
{
  "user_id":"google-oauth2|103200078395965841111", -> primary user id
  "identity": {
    "user_id": "6322635427a945dafe4edddd", -> secondary user id.
    "provider": "auth0"
  }
}

```

The second user id can be found under the user settings.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/b/2/b26670b94b92ef82f5245ce53c2468979eda7ac6.jpeg)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![pop](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pop/32/39917_2.png) [@pop](https://community.auth0.com/u/pop)\
**Post date:** [September 15, 2022, 12:17am UTC](https://community.auth0.com/t/how-to-create-a-password-change-ticket-in-secondary-identity/90575/4 "2022-09-15T00:17:54Z")

</div>

@lihua.zhang  
Thank you for reply.  
I tried identity params.  
But response is

```auto
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Payload validation error: 'Additional properties not allowed: identity'.",
  "errorCode": "invalid_body"
}

```

The API I tried is `/api/v2/tickets/password-change`, is that correct?

---

<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:** [September 15, 2022, 12:48am UTC](https://community.auth0.com/t/how-to-create-a-password-change-ticket-in-secondary-identity/90575/5 "2022-09-15T00:48:49Z")

</div>

Hi @pop ,

Sorry, I tried with an incorrect endpoint earlier. Could you please try the below scripts?

```auto
{
  "connection_id":"con_FZ5hzCqBaWtoMDKK", -> id of your Username-Password-Authentication connection
  "email":"aaa.bbb@xxx.com". -> email of the linked account.
}

```

The script is successful and I could update my auth0 (secondary) account password successfully.

Hope it works for you as well!

---

<div class="post-metadata">

**Author:** ![pop](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pop/32/39917_2.png) [@pop](https://community.auth0.com/u/pop)\
**Post date:** [September 15, 2022, 2:19am UTC](https://community.auth0.com/t/how-to-create-a-password-change-ticket-in-secondary-identity/90575/6 "2022-09-15T02:19:31Z")

</div>

@lihua.zhang  
thanks.  
I tried connection\_id and email send but error messaged “The user does not exist”.

```auto
{
  "statusCode": 404,
  "error": "Not Found",
  "message": "The user does not exist",
  "errorCode": "inexistent_user"
}

```

I try Username-Password-Authentication \> Try Connection login is “It Works!”.  
Do i need to configure anything?

```auto
my row json
{
    "created_at": "2022-09-05T04:33:45.909Z",
    "email": "xxxx@gmail.com",
    "email_verified": true,
    "identities": [
        {
            "provider": "google-oauth2",
            "user_id": "xxxx",
            "connection": "google-oauth2",
            "isSocial": true
        },
        {
            "profileData": {
                "email": "xxx@xxx.xx", <- use email
                "email_verified": true
            },
            "connection": "Username-Password-Authentication",
            "provider": "auth0",
            "user_id": "yyyy",
            "isSocial": false
        }
...

```

---

<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:** [September 15, 2022, 5:14pm UTC](https://community.auth0.com/t/how-to-create-a-password-change-ticket-in-secondary-identity/90575/7 "2022-09-15T17:14:55Z")

</div>

The scripts I provided [here](https://community.auth0.com/t/how-to-create-a-password-change-ticket-in-secondary-identity/90575/4) are the body scripts that work fine on my end.

I checked the tenant associated with your email and noticed there are no users under the tenant. Not sure if that is the correct one. Could you please DM me your tenant name, connection\_id, and user email? Thanks!

---

<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:** [September 26, 2022, 3:00pm UTC](https://community.auth0.com/t/how-to-create-a-password-change-ticket-in-secondary-identity/90575/8 "2022-09-26T15:00:53Z")

</div>

This topic was automatically closed after 11 days. New replies are no longer allowed.
