I am working on a process to change a users password in D2L via the API. I'm using PHP.
I need to push a users password change to D2L from another system. Example when the user changes their password in our Portal, I want to make a call to update the password in D2L via the API. In looking over the docs and I need the users "UserID" to make the PUT call as such:
PUT system/d2l/api/lp/1.0/users/UserID/password
{"Password": "HelloWorld5"}
How to I obtain this UserID? I can do a WhoAmI call but that is only valid for the logged in user. I do not see an api that I can call up the users account by UserName and obtain their UserID.
To get the user ID for a user based on their username, use the following call:
It can take the username as an argument (userName) otherwise it will return a complete (but paged) list of users. Note that this call requires sufficient (administrator/etc. privileges.)