Found this content helpful? Log in or sign up to leave a like!

sis_course_id do not included in course with enrollment_state is completed

Jump to solution
VinhHo3010
Community Member

Hi Everyone

I'm integrating an LTI tool using Canvas API
In our use case, we want to get the sis_course_id of a student when using `url:GET|/api/v1/users/:user_id/courses` but when I tried to get the course with 

"enrollment_state": "active" it has sis_course_id but the another with "enrollment_state": "completed" which has a term has been ended and it do not have sis_course_id included with it
 
But when I tried to use admin token that generate in setting both of them has sis_course_id with it
Do anyone have any suggestion for it?
Thank you
Labels (1)
0 Likes
1 Solution
sendres
Community Contributor

Hi @VinhHo3010,

I don't think the issue is the enrollment_state of the course. Instead, I think the issue is the user's role within the course.

To see the SIS ID (on screen or in an API response, the user needs to have the SIS Data - Read permission in the current context.) By default, the Teacher role in a course has the SIS Data - Read permission but other course roles do not. (See this reference for a complete rundown of the default roles and permissions, and note that the permissions may change from one school to the next.)

In short, you won't be able to rely on students being able to see their own courses' SIS IDs; you'll need an admin token or developer key to get that information.

View solution in original post