AnsweredAssumed Answered

Mapping REST API entitlements to Learn privileges for viewing admin user info

Question asked by smachaje on Apr 29, 2019

I was able to use the mapping spreadsheet from Managing REST Integrations in Learn: The REST Integrations Tool for System Administrators which allows me to create a custom system role for REST API app.  However, if an administrator user is enrolled in a course, the user api will return 404 error:


Unexpected HTTP status: 404 Not Foundobject(stdClass)#17 (2) { ["status"]=> int(404) ["message"]=> string(48) "User does not exist:Requested user is not found." }


Even if I add all entitlements to the custom role, this error does not go away.  The System Administrator user has student role in the course.


I understand the need to protect the admin users, but how can you check for the admin role to avoid dealing with the error, even if the api cannot see detail of the user?

Maybe the system admin user should not be listed in the roster at all ...