Unknown error with authentication API change password

I am trying to trigger a change password email via the authentication API after creating a customer’s account via the management API.

I am using the auth0-python library and the code is:

>>> from auth0.v3.authentication import Database
>>> db = Database('my domain')
>>> db.change_password('auth0|myuserId', 'my email', 'Username-Password-Authentication')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/me/.local/lib/python3.9/site-packages/auth0/v3/authentication/database.py", line 108, in change_password
    return self.post('{}://{}/dbconnections/change_password'.format(self.protocol, self.domain), data=body)
  File "/home/me/.local/lib/python3.9/site-packages/auth0/v3/authentication/base.py", line 50, in post
    return self._process_response(response)
  File "/home/me/.local/lib/python3.9/site-packages/auth0/v3/authentication/base.py", line 59, in _process_response
    return self._parse(response).content()
  File "/home/me/.local/lib/python3.9/site-packages/auth0/v3/authentication/base.py", line 86, in content
    raise Auth0Error(status_code=self._status_code,
auth0.v3.exceptions.Auth0Error: 404:

I get this log in the dashboard:

{
  "date": "2022-05-02T22:01:44.860Z",
  "type": "fcpr",
  "description": "unknown error",
  "connection": "Username-Password-Authentication",
  "connection_id": "",
  "client_id": "auth0|myuserId",
  "ip": "some ip",
  "user_agent": "Other 0.0.0 / Other 0.0.0",
  "details": {
    "body": {
      "tenant": "my tenant",
      "client_id": "auth0|myuserId",
      "connection": "Username-Password-Authentication",
      "email": "my email",
      "verify": true,
      "debug": false
    }
  },
  "user_id": "",
  "user_name": "my email",
  "log_id": "90020220502220148879264027924927591161038425056576798738",
  "_id": "90020220502220148879264027924927591161038425056576798738",
  "isMobile": false
}

Am I doing something wrong?

Hi @richard.matsunaga ,

Thank you for posting this topic on Auth0 Community!

In the log, client_id is set to the auth0 user id.

"client_id": "auth0|myuserId",

Actually it should be the Application’s clientID, for which you can find it under the application settings. This article explained the details. Hope this helps!

Thank you, obvious in retrospect.

1 Like