Overview
When inviting a user to an organization through Management API by utilizing the endpoint POST /api/v2/organizations/{id}/invitations
, it might appear as if the user is not receiving the roles passed in the request’s body.
Applies To
- Management API
- Organizations
- Roles
- Create invitations to an organization
Cause
This is caused by how the roles are treated when making a request through the endpoint POST /api/v2/organizations/{id}/invitations. The roles are only assigned to the user INSIDE the Organization.
Solution
Although it is not possible to see the roles assigned to the user in Dashboard > User Management > Users > [user] > Roles, it is possible to see them at Dashboard > Organizations > [organization] > Members > [member] > Assigned Roles.
This is because the Roles assigned when starting an Organization invite through Management API are not assigned to the user directly to his profile, but to the instance of the user in his Organization. These are separate Roles that are only meant to be used inside an Organization.