User Profile REST API response missing "sis_user_id" for non-Admin roles?

Community Explorer

Hi There

I develop an LTI application for Canvas that tracks Attendance for classrooms. We use Canvas' REST APIs to retrieve data such as Course Data, Course Enrollment Data, User Data, etc. One of the important things for our application is to be able to retrieve user data such as SIS ID, Integration ID or Login ID which is then used by other parts of the application. In order to retrieve this data, I've been using the "GET /api/v1/users/:user_id/profile" API. 

Recently however, I've started noticing that this API has stopped returning an SIS ID (or sis_user_id as it's labeled in the REST response). I'd actually come across this issue in the past but it had been resolved, so I am not sure what has caused it to crop up again. 

As an example, we have a sample user "Selina Kyle" in our sandbox environment who has user_id "19" and has been assigned the SIS ID "875663". When our Attendance tool is opened in a course where Selina is enrolled, the tool would make a REST request on behalf of the logged in user to get Selina's profile (https://<our environment>/api/v1/users/19/profile ). It is at this spot that I am seeing the difference in the responses.

When the logged in user is an Instructor in the course, the response we are getting is :

{"id":19,"name":"Selina Kyle","short_name":"Selina Kyle","sortable_name":"Kyle, Selina","title":null,"bio":null,"login_id":"","integration_id":null,"time_zone":"America/New_York","locale":null}

However, when the logged in user is a System Administrator in the environment, the response we are getting is :

{"id":19,"name":"Selina Kyle","short_name":"Selina Kyle","sortable_name":"Kyle, Selina","sis_user_id":"875663","integration_id":null,"title":null,"bio":null,"primary_email":"","login_id":"","time_zone":"America/New_York","locale":null}

As you can see, the "sis_user_id" seems to be blocked when the profile is being retrieved by a non-system administrator. I tried updating our developer key to use specific scopes rather than all scopes, but no change in the responses was observed. I am looking for a way to have this sis_user_id be returned for all roles who would be using our tool. Any information or help on this issue is highly appreciated!

Labels (2)