cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aleonard
Community Participant

Retrieving Own SIS ID from Users API Call As Teacher

Jump to solution


Hello,

On my Account, I have the setting "Read SIS data" checked for Teachers.

However, when I "become" a Teacher, and execute an API call to the Users API, I am not able to see my own SIS ID.

For example, when I call to: https://xxxxx.instructure.com/api/v1/users/self I get:

{"id":4265906,"name":"NAME","sortable_name":"NAME","short_name":"NAME","avatar_url":"url","locale":null,"permissions":{"can_update_name":false,"can_update_avatar":true}}

If I add /profile on to the end of that URL, I get a few more fields. For example, `integration_id`, `primary_email`, and `login_id`. But still no SIS ID.

Is this by design? Is there any way to give a Teacher permission to see their own SIS ID without giving them admin permissions?


Thank you very much.

1 Solution

Accepted Solutions
aleonard
Community Participant

Not misunderstanding, but the account that you are executing the command from must have more permissions than the one I am dealing with. My call to that api Masquerading as a teacher, with no additional administrative privileges of any kind, empirically does not include the sis information.

Danny Wahl's answer was the key though. Since the permissions given to Teachers on my installation are only Course-centric, and not Account-centric, they can only view SIS information within the scope of the course enrollments.

Thanks everyone!

View solution in original post

5 Replies
kona
Community Coach
Community Coach

 @aleonard ​, given the technical aspect of your question I'm going to share this with the Canvas Developers​ group in the Community. They are the back-end programmers that should be able to help answer this question!

dwahl_sales
Instructure
Instructure

Hi  @aleonard ​,

According to this thread (Read SIS Permissions, What Does this Allow?) for teachers to read SIS information it has to be within the context of a course.  So you won't be able to use /users/profile/self because that's the Account-level lookup, but you can look yourself up in one of your courses using the Enrollments API.

/api/v1/courses/{course ID}/enrollments?user_id=self

The SIS ID will be returned in each object (1 object per-section enrollment).  If you need to get a course ID first, you could chain this behind an enrollment & type lookup to allow the user to see it anywhere in the system.  Hope that helps!

MattHanes
Community Champion

When I run that command as a teacher, it returns the sis_login_id and the sis_user_id. Am I misunderstanding?

sisid.jpg

aleonard
Community Participant

Not misunderstanding, but the account that you are executing the command from must have more permissions than the one I am dealing with. My call to that api Masquerading as a teacher, with no additional administrative privileges of any kind, empirically does not include the sis information.

Danny Wahl's answer was the key though. Since the permissions given to Teachers on my installation are only Course-centric, and not Account-centric, they can only view SIS information within the scope of the course enrollments.

Thanks everyone!

View solution in original post

maguire
Community Champion

I am not able to get the integration_id information from the GET /api/v1/users/:id API, but can get it via the GET /api/v1/users/:id/profile API. Also, neither of these gives me the sis_user_id - but I can get this information via the GET /api/v1/courses/:course_id/enrollments API!

Interestingly I can look up the user by using passing sis_user_id:person_id in the call to either of the first two APIs (where person_id is the sis_user_id value).