check_enrollment
Check whether a specific campus login ID is enrolled in a Canvas course. Returns a yes/no answer with minimal enrollment metadata, filtering by role and active status.
Instructions
Check whether a specific campus login ID is enrolled in a course.
Answers a roster-membership question about an externally-supplied person (NOT the caller). Returns only a yes/no plus minimal enrollment metadata — never the roster, names, or grades. Requires a Canvas token with roster-admin rights; without them the answer is INDETERMINATE, never "no".
To ask about YOURSELF, use get_my_enrollments instead — it needs no roster permission and cannot return an indeterminate answer.
Note that role defaults to "student". A NO answer is scoped to that
role and will name any other role the person holds; pass role="any" when
you just want to know whether they are in the course at all.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | Enrollment type that satisfies the check — "student" (default), "teacher", "ta", "observer", "designer", or "any". | student |
| net_id | Yes | The person's campus login ID — NetID, uniqname, campus ID, or the full email-style Canvas login. Matched against Canvas `login_id` then `sis_user_id`; `zqian` and `zqian@umich.edu` are treated as the same identifier. NOT a display name. | |
| active_only | No | Only count active enrollments (default True). | |
| course_identifier | Yes | Course code, numeric ID, or SIS ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |