# \[Feature-13075\]Provide Session IP as Session Property

**URL:** <https://forum.inductiveautomation.com/t/feature-13075-provide-session-ip-as-session-property/23226>\
**Category:** Ignition Early Access\
**Created:** [March 11, 2019, 7:02pm UTC](https://forum.inductiveautomation.com/t/feature-13075-provide-session-ip-as-session-property/23226 "2019-03-11T19:02:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SMcIntosh](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@SMcIntosh](https://forum.inductiveautomation.com/u/SMcIntosh)\
**Post date:** [March 11, 2019, 7:02pm UTC](https://forum.inductiveautomation.com/t/feature-13075-provide-session-ip-as-session-property/23226/1 "2019-03-11T19:02:19Z")

</div>

Is there any way to check where a perspective client is opened - like an address or host name? I’m creating a setting which is set based on which device a user opens a client on. Previously, session.props.gateway.address appeared to contain a value that could be used for this purpose - but now it is actually always the address of the gateway. Is it / will it be exposed anywhere else?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 11, 2019, 7:11pm UTC](https://forum.inductiveautomation.com/t/feature-13075-provide-session-ip-as-session-property/23226/2 "2019-03-11T19:11:13Z")

</div>

`session.props.gateway.address` was _mistakenly_ displaying the session user’s IP, when it should have been displaying the Gateway’s IP all along. This was just fixed in the last few days.

`system.net.getIpAddress()` should get you what you’re looking for.

---

<div class="post-metadata">

**Author:** ![SMcIntosh](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@SMcIntosh](https://forum.inductiveautomation.com/u/SMcIntosh)\
**Post date:** [March 11, 2019, 7:16pm UTC](https://forum.inductiveautomation.com/t/feature-13075-provide-session-ip-as-session-property/23226/3 "2019-03-11T19:16:36Z")

</div>

Thank you for the quick response!

I took a look at the function you mentioned, and that always gets me the gateway IP when I call it from perspective - not the session user’s.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 11, 2019, 7:20pm UTC](https://forum.inductiveautomation.com/t/feature-13075-provide-session-ip-as-session-property/23226/4 "2019-03-11T19:20:27Z")

</div>

Ooops, yes, after thinking about it, that script would be running on the Gateway, so it ~~probably~~ is returning the Gateway’s IP… My mistake.

I’ll open a ticket for this because we really should be providing that value as a Session property as there’s no way via scripting to obtain it since the script would always run on the Gateway.

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [April 16, 2019, 3:31pm UTC](https://forum.inductiveautomation.com/t/feature-13075-provide-session-ip-as-session-property/23226/5 "2019-04-16T15:31:32Z")

</div>

This feature was added in the nightly build uploaded today (4/16).
