Object didn't pass validation for format user-invitation-id

Im using https://auth0.github.io/node-auth0/classes/management.OrganizationsManager.html#getInvitation
and when I pass invitation_id to it, it throws this error.
Here is the invitation ID: 8pEiJtjr9gtx6aA2ORybYQcU6FlH48Ej
What is wrong?

Hi @sungbin,

Welcome to the Auth0 Community!

The invitation_id you shared appears to reference the ticket_id. However, it should be formatted like uinv_Fm656rIGeaARh0OW, with the prefix uinv.

Given that, you should use the id property from the invitation creation results.

Let me know if there’s anything else I can do to help.

Thanks,
Rueben

Dear Rueben,

Thank you for a timely response. I realized that Auth0 sends ticket_id instead of invitation_id as the invitation search param when redirecting to the signup url. Do you know why they send the wrong ID?

If this behavior is correct, then how do I get the invitation using ticket_id?

Thank you,

1 Like

Hi @sungbin,

Thanks for the response.

You are referencing a different property in the result. Instead of the’ ticket_id, ’ look for the id parameter.

Here is an example response:

{
  "id": "uinv_M7HHonHr4h65HBzg",
  "client_id": "jjEulmsP8SFx...",
  "inviter": {
    "name": "test1@example.com"
  },
  "invitee": {
    "email": "test2@example.com"
  },
  "invitation_url": "https://MY_DOMAIN.us/authorize?response_type=code&client_id=jjEulmsP8SFx...&redirect_uri=REDIRECT_URI&audience=AUDIENCE&scope=openid+profile+email&state=STATE&invitation=blYhAF61QqEXtSYZaFnzHefq66j9qqoO&organization=org_91aHlTqTBtIrzd1C&organization_name=test-org",
  "ticket_id": "blYhAF61QqEXtSYZaFnzHefq66j9qqoO",
  "created_at": "2024-06-28T23:55:50.236Z",
  "expires_at": "2024-07-05T23:55:50.236Z",
  "organization_id": "org_91aHlTqTBtIrzd1C"
}

You can see how the id is prefixed with uinv which is the correct invitation ID you need to reference to get the user’s invitation.

I hope this helps!

Thanks,
Rueben

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.