- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 08:12 AM
I'm new to Service Now and am exploring REST APIs.
I have created a user named "Ajay". I have got the access_token of this user. I am getting the details of this user using the below request.
curl --location 'https://dev191.service-now.com/api/now/table/sys_user' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer Vmxn6CYIC...............OohTqA'
The request returns the list of all users. However, I want the request to return only the user identified in the access_token.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 11:29 AM
Maybe what you are looking for is this?
GET instance.service-now.com/api/now/ui/user/current_user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 10:33 PM
Hello @sahilkhanna
Set the endpoint to "https://dev191.service-now.com/api/now/ui/user/current_user"
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"
Thank You
Juhi Poddar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 11:29 AM
Maybe what you are looking for is this?
GET instance.service-now.com/api/now/ui/user/current_user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 08:40 PM
Hi @sahilkhanna
pass the sys_id of user to URL
https://dev191.service-now.com/api/now/table/sys_user/sys_id
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 09:16 PM
your endpoint is to get all user records so it won't return specific user but will return all users
you need to pass the user sysId to get the particular user from sys_user table
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 10:01 PM
{
"result": [
{
"sys_id": "1234567890abcdef",
"user_name": "Ajay",
"first_name": "Ajay",
"last_name": "Sharma",
"email": "ajay@example.com",
...
}
]
}
For a quick way to fetch the authenticated user's details, use the /api/now/table/sys_user/me endpoint. This is the simplest and most effective approach, as it ensures that you're getting the details of the user tied to the provided access_token.
If you want to filter by user_name or sys_id explicitly, you can use query parameters in the /api/now/table/sys_user endpoint.