Auth0 Home Blog Docs

Path validation when trying to link accounts

Hello,

Getting a path validation error when trying to link a user account. The ID of the originating user is sms|5cb0bd1e012d5b66900a407d. As per the client-side account linking documentation, I gather that the user ID I need to pass to this function is the bit after the |, so 5cb0bd1e012d5b66900a407d. Is that correct?

If so, I’m getting the following error back from my API call:

"Path validation error: 'Object didn't pass validation for format user-id: 5cb0bd1e012d5b66900a407d' on property id (The user_id of the primary identity where you are linking the secondary account to).

What am I getting wrong here? I even left in the sms| but then I get an authorization failure because the user IDs don’t match.

I also posted about this a few days ago but haven’t gotten any responses: I think the docs could use a bit of clarity around which account needs to create the management API interface to perform the link. I think I need to authorize with the secondary account, requesting the correct audience, then use that set of credentials to perform the link. Is that correct? also, if I’m using a custom domain, which clients need to use my auth0.com domain? Just the management API client, the secondary client I reauthorize with, or both?

Thanks.

Hi @ndarilek,

Thanks for reaching out.

The primary account user_id should be in the URL. If I rememeber correctly it will include the sms and pipe.

The secondary will be in the payload.

Can you DM me the name of the users you are trying to link and the tenant name so I can take a look?

Thanks,
Dan