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!
We're in the process of storing custom user data in Canvas using the API to support an LTI that needs data we can't otherwise display to them (user's home campus.)
https://canvas.instructure.com/doc/api/users.html#method.custom_data.set_data
Since the data will already be in there, I'd like to be able to allow teachers/campus administrators to see a given user's home campus. I've managed to successfully inject the data into a page using custom javascript but right now it look like only account admins can retrieve the data. Everybody else gets a 401 error.
Does anybody know more about the permissions required for custom data or has anybody implemented something similar?
I noticed the following in the documentation: "In order to access another user's custom data, you must be an account administrator with permission to manage users."
Do any of the users you tested with have permissions related to managing users? I'm curious which permissions it specifically requires since it looks like those permissions may be more granular now compared to when this part of the documentation was written.
You may find that developing an LTI solution allows you much more control over exactly who is able to see which bits of data. A useful placement might be "Student Context Card" which allows a tool to be placed on the card that slides out when a teacher clicks on a student in a course.
Here my "New Test" tool is a local LTI tool that could display the data for a user. However this doesn't seem very good from a user experience point of view as a teacher would have to click through to each student (2 clicks) to find out their home campus.
Having a LTI tool that uses the Names and Roles service to display everyone in the course and then alongside display the home campus would seem like a much more usable solution.
If you are unable to use an LTI placement to display this additional data then there's the option of creating the LTI launch JWT from Canvas using an XHR call to the undocumented 'jwt_token' endpoint which you can then use to make an LTI launch to your tool.
To interact with Panda Bot in the Instructure Community, you need to sign up or log in:
Sign In