Can't get the newly created user in the list of all users

140 views Asked by At

I sent a request to /d2l/api/lp/1.30/users/ and created new student.

This is my request params

{
  "OrgDefinedId": 'testId',
  "FirstName": 'testUser222',
  "MiddleName": '',
  "LastName": 'LastName',
  "ExternalEmail":'[email protected]',
  "UserName": 'Sam',
  "RoleId": '110',
  "IsActive": true,
  "SendCreationEmail": true
}

I can get this user using get request /d2l/api/lp/1.30/users/344

I also activated this user by email and set new password. I can login as this user at LMS.

But, i can't get this user using this request

/d2l/api/lp/1.30/users/

This user is not in the general list of users

What have I done wrong? Maybe I need some other additional request in order for it to be displayed in the general list of users?

1

There are 1 answers

4
Paul Janzen On

I am assuming you are referencing this route - https://docs.valence.desire2learn.com/res/user.html#get--d2l-api-lp-(version)-users-

In order to have the user included in this call's response your api user account needs to have the "Users - Search for 'xxx-role'" permission enabled.

This route does page its response, so you may have to page through the response to find the specific user.

This route does support query parameter filtering, which will reduce the number of users included in the response.