- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â02-13-2024 06:24 AM
1. Created user using "api/now/table/sys_user" API
2. Able to login using "/oauth_token.do" API, received access and refresh token
3. Trying to update user with "api/now/table/sys_user/sys_id" without providing user_admin role, getting success but no update
4. Provided "user_admin" role, user updated successfully
Is there any way to update own user details by passing own access token?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â02-13-2024 07:19 AM
Hello @prasadpotale ,
You are using Table API you can have control if your are using a scripted rest api.
You can write your script as below.
var usr = New GlideRecord('sys_user');
usr.get(gs.getUserID())
below you can have your update based on your payload.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â02-13-2024 07:19 AM
Hello @prasadpotale ,
You are using Table API you can have control if your are using a scripted rest api.
You can write your script as below.
var usr = New GlideRecord('sys_user');
usr.get(gs.getUserID())
below you can have your update based on your payload.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â02-14-2024 05:20 AM
Thanks, this worked for me.