fetchUsers = OktaService.new(path="/api/v1/apps/#{ENV["OKTA_CLIENT_ID"]}/users")
response = fetchUsers.process
render status: :ok, json: {response: response}
fetchUser = OktaService.new(path="/api/v1/users/#{params[:id]}")
userResponse = fetchUser.process
fetchUserGroup = OktaService.new(path="/api/v1/users/#{params[:id]}/groups")
groupResponse = fetchUserGroup.process
render status: :ok, json: {response: userResponse, group: groupResponse}
When fetching a single user the profile object has firstName
and lastName
. But when fetching all the users from the application endpoint, we have to use given_name
and family_name
.