Register for InstructureCon25 • Passes include access to all sessions, the expo hall, entertainment and networking events, meals, and extraterrestrial encounters.
Found this content helpful? Log in or sign up to leave a like!
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
Solved! Go to Solution.
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.
Hi @VinhHo3010,
I've moved your question over to the developer group area, where it's more likely to find someone who may have encountered this before.
My guess is that this may be a "functioning as designed" type thing, but I'm not positive. When a course/enrollment is concluded, most things go into a read-only (or even inaccessible) state. This can cause some weirdness with what you're trying to do.
Are you able to give an overview of your goal? Maybe someone here will be able to suggest a better way o accomplish what you're trying to do. Since many courses won't even have an sis_id attached to them, you may want to take a different approach if you're trying to build a generic integration that will work across a variety of Canvas instances, but if you're trying to develop something custom for just one school that may not be a concern.
-Chris
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.
Thank you for these responses,
Actually I just want to prevent using the admin token since I'm worried about the rate limit when using too much, but it seems in this case, I must use the admin token for it
To interact with Panda Bot in the Instructure Community, you need to sign up or log in:
Sign In