Create org invite via API with RoleId does not add role

Ready to post? :mag: First, try searching for your answer.
I am creating an org invite with a role Id and it is not adding the role to the new user (after he accepts the invite). Is this a defect?

curl --location ‘https://xxxxxx.us.auth0.com/api/v2/organizations/orgxxxxxghut/invitations’
–header ‘Authorization: Bearer eyQ6A’
–header ‘Content-Type: application/json’
–data-raw ‘{
“inviter”: {
“name”: “Danielle xxxxx”
},
“invitee”: {
“email”: “xxxxxx@gmail.com
},
“client_id”: “BExxxxxxxxxxxe0”,
“connection_id”: “con_o8xxxxxxxxG”,
“app_metadata”: {},
“user_metadata”: {},
“ttl_sec”: 0,
“send_invitation_email”: true,
“roles”:[“rol_QxxxxxxxQ”]
}’

it does work actually. it doesn’t add the role to the newly created user, it adds it to the organization member

1 Like

Thanks for following up with the community @dani2! :slight_smile:

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