1

I am trying to get the user sys_id by username using the SNOW REST API. But I couldn't find a way of doing it in the SNOW API doc.

Is it impossible to do so or any other alternative way of doing it?

Thelouras
  • 852
  • 1
  • 10
  • 30
Cyclops
  • 649
  • 3
  • 8
  • 33

1 Answers1

4

Yes, this is a simple GET call. sys_id isn't returned on the default fields but will be returned if you explicitly request it:

https://[your instance].service-now.com/api/now/table/sys_user?sysparm_query=user_name%3D[your username]&sysparm_fields=sys_id&sysparm_limit=1

The REST api explorer is very handy for building and testing queries like this. You can find it by searching the navigator.

mr.freeze
  • 13,731
  • 5
  • 36
  • 42