Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

update user profile using REST API

amitservicenow
Kilo Contributor

I want to update a already existing user profile using REST Api. The problem is that PATCH request in servicenow API explorer does not give me a field to write the matching query.

Could someone let me know how can i match the 'user_name' field in user table using api so that the user record can be updated when the user fills the front end form which is written in .Net

7 REPLIES 7

its difficult to comment on this as i dont know what kind of integration you have. dont you have list of sys_id for users on .net side?



may b you can make a GET rest call to instance..n query for userId field. and get sys_id of that user. then pass that sys_id in Patch/PUt call.


Hi Rushit,



I feel that it would be very lengthy process but he needs to focus on that why it is not working for the user_name since it is unique and it works.



May be he can try all the possibility and raise a hi ticket in case it does not go through.



Regards,


Atul Kumar


Hi atul, yes it is a lenthy process but i dont see any other option. service now's API is made that way(it neeeds sys_id for any kind of updation.)


lets see if HI pepl have any other solution.