Last Updated: Dec 17, 2024
Overview
A user has a role within the context of organizations, but it does not appear in a post login action with event.authorization.roles
or with context.authorization.roles
in Rules.
Applies To
- Post Pogin Action
- Rules
- Organizations
Cause
If a login is not occurring in the context of an Organization login, then the list of Roles will be the standard role-based access control (RBAC) roles assigned to the user outside of organizations, and will not include the Organization Roles assigned to the user.
Solution
If the login is occurring in the context of an Organization, then the Organization roles will be listed in event.authorization.roles
in Actions or context.authorization.roles
in Rules.
Essentially, if the login is through Organizations, the list of roles will be the same as the ones found from the /api/v2/organizations/{id}/members/{user_id}/roles
endpoint.
If it is not an Organizations login, it will be the same list of roles found from the /api/v2/users/{id}/roles
endpoint.