# Info user and computer name from perpective

**URL:** <https://forum.inductiveautomation.com/t/info-user-and-computer-name-from-perpective/99477>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 5, 2024, 3:31pm UTC](https://forum.inductiveautomation.com/t/info-user-and-computer-name-from-perpective/99477 "2024-12-05T15:31:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![user67](https://avatars.discourse-cdn.com/v4/letter/u/e274bd/32.png) [@user67](https://forum.inductiveautomation.com/u/user67)\
**Post date:** [December 5, 2024, 3:31pm UTC](https://forum.inductiveautomation.com/t/info-user-and-computer-name-from-perpective/99477/1 "2024-12-05T15:31:29Z")

</div>

Is there a way for an perspective client to get the windows user name and computer name?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 5, 2024, 3:33pm UTC](https://forum.inductiveautomation.com/t/info-user-and-computer-name-from-perpective/99477/2 "2024-12-05T15:33:10Z")

</div>

I'm pretty sure the answer is no. That would be a browser malware vulnerability.

> [@Perspective Workstation Computer Name](https://forum.inductiveautomation.com/t/perspective-workstation-computer-name/42467/3):
>
> That does not show the computer name outside of the designer.

> [@Perspective - Scripting - Get Computer name and IP of client](https://forum.inductiveautomation.com/t/perspective-scripting-get-computer-name-and-ip-of-client/49626/11):
>
> Keep in mind that this operation works on the IP address of the TCP (http) connection to the server from the Server’s perspective. Clients behind a NAT firewall will be seen as the firewall’s IP, and with the name of the firewall via reverse DNS. Users familiar with Vision’s total access to the local computer will forever be disappointed at the lack of access via browsers.

> [@Security zone with IP addresses](https://forum.inductiveautomation.com/t/security-zone-with-ip-addresses/56899):
>
> Hello, I trying to create a security zone to prevent access to perspective from outside of a specific IP range. (192.168..) I’ve created the security zone and I’ve configurated the project properties to restrict access to user outside this zone. I’ve tried configuring the IP addresses of the security zone in different ways and I can’t get it to work: IP Addresses: 192.168.. IP Addresses: 192.168.0-255.0-255 I have even tried: ... or from the localhost: 127.0.0.1 …and none of this works,…

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 5, 2024, 8:24pm UTC](https://forum.inductiveautomation.com/t/info-user-and-computer-name-from-perpective/99477/3 "2024-12-05T20:24:15Z")

</div>

If you need that, use Vision, not Perspective.

---

<div class="post-metadata">

**Author:** ![bmpaz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmpaz/32/76418_2.png) [@bmpaz](https://forum.inductiveautomation.com/u/bmpaz)\
**Post date:** [December 20, 2024, 2:02pm UTC](https://forum.inductiveautomation.com/t/info-user-and-computer-name-from-perpective/99477/4 "2024-12-20T14:02:14Z")

</div>

You can get the user name and IP by calling the function: system.perspective.getSessionInfo(). It returns a long string with all of the current connected client sessions and you can pick out the IP and user from a session by finding that session id that matches the id returned from self.session.props.id. It doesn't give computer name though.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 20, 2024, 2:09pm UTC](https://forum.inductiveautomation.com/t/info-user-and-computer-name-from-perpective/99477/5 "2024-12-20T14:09:00Z")

</div>

No need to search through session info. Those two items are already present in `session.props.host` and in `session.props.auth.user.userName`. And more.

But note that the `host` information is not accurate when the client is behind a NAT router. (Cannot be accurate.)

The information desired by the OP is simply not available in browser-based systems. If you need it in Ignition, use Vision.
