If you're trying to do this for an individual user or just a handful of users, then you can use the Enrollments API:
"GET /api/v1/users/:user_id/enrollments"
So, for a user with attributes like this:
- sis_login_id: kylo_ren
- sis_user_id: kr12345
- canvas user id: 98765
It would be one of these:
- GET /api/v1/users/sis_login_id:kylo_ren/enrollments
- GET /api/v1/users/sis_user_id:kr12345/enrollments
- GET /api/v1/users/98765/enrollments
If you get an empty response back, then the user has no enrollments. For multiple users, just loop through your own list, making one API call per user. If you'd like a code sample, i can share what i've done with PHP for this kind of thing.
If you're trying to do this for all users in the whole canvas environment (or too many to loop through efficiently), then the easiest way would be to do what Mary mentioned above (generate report, compare to your own list of users).
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.