Method: Auth0::Api::V2::Users#get_user_roles
- Defined in:
- lib/auth0/api/v2/users.rb
#get_user_roles(user_id, options = {}) ⇒ json
Get all roles assigned to a specific user.
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/auth0/api/v2/users.rb', line 212 def get_user_roles(user_id, = {}) raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty? path = "#{users_path}/#{user_id}/roles" request_params = { per_page: .fetch(:per_page, nil), page: .fetch(:page, nil), include_totals: .fetch(:include_totals, nil) } get(path, request_params) end |