Object didn't pass validation for format user-id: undefined

Gents,
I am getting this `` when making a request that does not require user-id. Here is what I am seeing in the logs.

{
  "date": "2017-11-26T17:09:24.281Z",
  "type": "fepft",
  ***"description": "Path validation error: 'Object didn't pass validation for format user-id: undefined' on property id (The user_id of the user to update).",***
  "connection": "xxxxxxxxxxxxxx",
  "connection_id": "xxxxxxxxxxxx",
  "client_id": "xxxxxxxxxxxxxxx",
  "client_name": "Bakalr Mobile",
  "ip": "xxxxxxxxxxxxx",
  "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1",
  **"user_id": "",**
  "user_name": "xxxxxxxxxxxxxxxx",
  "audience": "xxxxxxxxxxxxxxx",
  "scope": "openid",
  "log_id": "495744195898582546623571326"
}

Has anyone seen this before?

@bsakweson +1

@bsakweson the user_id is actually required. It is the userId (begins with auth0| ) which comes coded in the jwt. Put that there instead and it should work. Also make sure you also have proper scope set-up on the API for whichever operations you are trying to perform.

1 Like

The fepft log entry is associated with the resource owner password credentials grants (Failed exchange of Password for Access Token) which means that it is an authentication flow where custom rules are executed.

The above when put together with the error message suggest that a likely source of the issue might be a custom rule that is performing an API operation that requires a user identifier (for example updating user metadata from a rule) and is not passing the expected user identifier parameter (according to the message is passing undefined as the user identifier).

You should review your rules and any other custom code you may have that can be applicable (for example, custom database connections would also mean custom code would be executed which could be another source of issues).