The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
I'm looking for a way to generate a report that would show the number of Observer accounts we currently have on our instance, as well as the most recent login date for each account.
We're trying to figure out how many active Observer accounts we have.
I imagine this is something I can do with the API or GraphQL, but I have zero knowledge about how to use those.
The easiest way to get this data site-wide is to use Canvas Data: https://community.canvaslms.com/t5/Admin-Guide/What-is-Canvas-Data-2/ta-p/560956
You can get the data with a single query rather than having to make multiple API calls and create a script/program to make those calls.
The query to get this data is as follows
SELECT users.name, max(pseu.last_login_at) FROM canvas.enrollments enrol
JOIN canvas.pseudonyms pseu on pseu.user_id = enrol.user_id
JOIN canvas.users users on users.id = pseu.user_id
AND type = 'ObserverEnrollment'
GROUP by users.name
If you need help setting up Canvas Data, feel free to send me a PM.
You could consider combining information from different Canvas Account Reports together. If you go to your Admin account, click Settings in the account navigation, and click the Reports tab, you will see the different available reports.
You could run a Provisioning Report first to find users that are Observers. If you only care about Observers that are linked with Students, you could run the "User Observers" report. If you want to find all users that are enrolled as an Observer, you will want to run the "Enrollments" report. Keep in mind, while select "All Terms" is the simplest option to get all data at once, if you have been using Canvas for awhile it may take a while for the report to generate.
To determine last login/activity, you can run the "Last User Access" and/or "Last Enrollment Activity" report.
Once you have the reports you need, you could use Excel and the XLOOKUP function to combine the data together.
To go the API route, you will most likely need to learn how to handle pagination to get all of the results. The List users in account endpoint would be a good starting point. You can use the request parameter "enrollment_type" to limit the users to only those that are enrolled as "observer" in a course. The data returned from this will also show last login.
Here are some resources in the Canvas Community that may help with getting started with the Canvas API:
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in