get_user_role_user
Retrieve a user's role and assigned resources by user ID or email. Use for read-only role lookups and reporting.
Instructions
๐ข READ-ONLY ยท GET /v2/users/{id}/user-role
Get user role of a user. Returns the user role of the user specified by the provided user id. Includes the assigned resources, if applicable (assigned course(s) for instructor role, assigned user group(s) for user group managers, assigned seat offering(s) for segment manager, assigned segment for reporter roles).
Behavior: read-only lookup against the live school; creates, changes and deletes nothing. Auth (admin API token + Lw-Client id) is injected server-side, never by the model; calls are throttled to stay under LearnWorlds' 30-per-10s cap and retried on 429/5xx.
Returns: HTTP <status> followed by the LearnWorlds JSON response body. A non-2xx reply surfaces as a tool error with that status and the API error payload โ 401 bad/expired token, 403 not permitted, 404 no such record, 422 rejected input.
Use when: safe to call speculatively for lookups and reporting. Not for changing anything โ use the matching ๐ก write tool. Related Users tools: update_user_role_user, enroll_user_product, get_courses_enrollments_user, get_products_user, get_seat_offerings_that_user_is_member.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | User Id or email |