cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
l_dellar
Community Participant

When getting a list of user objects via the API why is integration_id not included? or is there a way of including all properties in this returned user object?

Jump to solution

When getting a list of user objects using the API below:

/api/v1/accounts/:account_id/users


we get something like this returned:


{

                "id": 1000001,

                "name": "Adam Example",

                "sortable_name": "Example, Adam",

                "short_name": "Adam Example",

                "login_id": "aexample"

}


Is there a way of including other full user details in the return json of this such as integration_id, much like the example API user object on the API documentation page here?

Users - Canvas LMS REST API Documentation  


Thanks

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
l_dellar
Community Participant

Thanks all for your help, yeah as you have suspected this seems to be due to the fact we are importing via the API instead of doing a SIS import. When manually adding a SIS ID to a user and then listing them we get all the details we require. 

We presume this is just how it's done, as in our case we are using the integration_id as a secondary identifier due to the way our users are stored so if we don't have a SIS ID we don't get this.

Again, thanks for your help.

View solution in original post

5 Replies
llawson
Community Contributor

Hi there,

Are you sure? Whenever we call the following GET method:

GET https://school.instructure.com/api/v1/accounts/self/users

We get the following fields by default:

id

name

sortable_name

short_name

sis_user_id

integration_id

sis_login_id

sis_import_id

login_id

dgrobani
Community Champion

Interesting, when I query that endpoint I get id, name, sortable_name, short_name, sis_user_id, integration_id, sis_login_id, sis_import_id, and login_id.

The comment for integration_id in the User object descriptions says "This field is only included if the user came from a SIS import and has permissions to view SIS information."

Do you have admin permissions?

llawson
Community Contributor

This makes sense, and yes it appears account admins (myself included) would be able to see this field. Whether this is limited to account admins I do not know but it is a start.

dgrobani
Community Champion

I just noticed in my test that for users not created via SIS, the only fields returned are the five you got.   

l_dellar
Community Participant

Thanks all for your help, yeah as you have suspected this seems to be due to the fact we are importing via the API instead of doing a SIS import. When manually adding a SIS ID to a user and then listing them we get all the details we require. 

We presume this is just how it's done, as in our case we are using the integration_id as a secondary identifier due to the way our users are stored so if we don't have a SIS ID we don't get this.

Again, thanks for your help.

View solution in original post