Create New User through REST API Explorer

jamespfencil
Kilo Contributor

Trying to create a new user through the REST API Explorer and not having much luck. What are the requirements for creating a new user?

I created a new field called username, location, profile photo, etc can those be the only requirements?

1 ACCEPTED SOLUTION

Mark Stanger
Giga Sage

I'm testing this in my instance and the only thing that is required is a unique 'user_name' attribute and running the create as a user who has permissions to write to the 'sys_user' table (I'm using an admin account).  Also note that you need to supply a sys_id for the location record unless you've set the property for display values to be allowed for reference fields (although this shouldn't prevent the insertion of the user record.

View solution in original post

5 REPLIES 5

Mark Stanger
Giga Sage

I'm testing this in my instance and the only thing that is required is a unique 'user_name' attribute and running the create as a user who has permissions to write to the 'sys_user' table (I'm using an admin account).  Also note that you need to supply a sys_id for the location record unless you've set the property for display values to be allowed for reference fields (although this shouldn't prevent the insertion of the user record.

Thank you very much for your help!!! Is it possible to upload a photo to a custom table that contains a photo type field? 

Should be able to do this with the attachment API but I haven't tried it.

https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/integrate/inbound_rest/concept/c_...

Image fields are just an attachment that has pointer to a specific table, record, and field like this...

find_real_file.png

After uploading an image to an image field, I see the following symbol: 

 

 

Not all images look like this, as most show the actual image uploaded. Do you know what that symbol means?