Finding the Hostname of the Device
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 08:50 PM
HI,
I have a requirement to find the logged in user system hostname. For example the user logged into ServiceNow Instance with his personal system or organization system we want to find the host name of the device from which the user logged into ServiceNow.
Thanks & Regards,
Varaprasad Kandula.
- Labels:
-
Multiple Versions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 09:18 PM
On the server, only able to get the ip address from where the user is connection from.
gs.getSession().getClientIP().toString();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 09:27 PM
Thanks Hitoshi, can't we get the system name/hostname?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 09:50 PM
Not with the standard web browser.
Not sure if IE still allows this but they used to allow ActiveXObject to access user's machine to gather information.
If all users are internal, it'll be better to use client certification rather than trying to get client's host name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 09:36 PM
Hi,
check this link
Machine name of logged in User
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader