To get current logged in user details using client script Glide Ajax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2024 05:41 AM
To get current logged in user details using client script Glide Ajax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2024 05:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2024 07:03 PM
Hi @Astik Thombare,
To get current logged in user details using client script Glide Ajax
Like if we select the user then we need to get the user's email, location and department.
Cold you please help me on this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2024 06:30 PM
Hi @vijay T1 you can get this directly in onLoad client script, no need script include unless you want to get user details
script:
var userID = g_user.userID; alert('Current user ID = ' + userID);
Reference : https://developer.servicenow.com/dev.do#!/reference/api/vancouver/client/c_GlideUserAPI#r_GlideUserU...
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2024 06:36 PM
You can always use g_user user object for this which is supported in client side scripts:
Follow below cheat sheet for client side server user attributes that can be used:
https://servicenowguru.com/scripting_user-object-cheat-sheet/
Aman Kumar