# Get embedded login window details in Perspective

**URL:** <https://forum.inductiveautomation.com/t/get-embedded-login-window-details-in-perspective/80940>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 25, 2023, 4:37am UTC](https://forum.inductiveautomation.com/t/get-embedded-login-window-details-in-perspective/80940 "2023-10-25T04:37:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ignitionSL](https://avatars.discourse-cdn.com/v4/letter/i/9e8a1a/32.png) [@ignitionSL](https://forum.inductiveautomation.com/u/ignitionSL)\
**Post date:** [October 25, 2023, 4:37am UTC](https://forum.inductiveautomation.com/t/get-embedded-login-window-details-in-perspective/80940/1 "2023-10-25T04:37:14Z")

</div>

How to get this additionally opened window data in to script?  
I scripted a button for an authentication and need to get the verified data in Perspective. I used 'system.perspective.authenticationChallenge'

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/3/93fab3c3048af19e78f1863d686f6d27109a0836.jpeg)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 25, 2023, 6:47am UTC](https://forum.inductiveautomation.com/t/get-embedded-login-window-details-in-perspective/80940/2 "2023-10-25T06:47:20Z")

</div>

when you login, the user name will come into the session.props

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [October 25, 2023, 2:47pm UTC](https://forum.inductiveautomation.com/t/get-embedded-login-window-details-in-perspective/80940/3 "2023-10-25T14:47:00Z")

</div>

The actual `authenticationChallenge()` function doesn't return anything but if you set up an [Authentication Challenge Completed Event Script](https://docs.inductiveautomation.com/display/DOC81/Perspective+Session+Event+Scripts#PerspectiveSessionEventScripts-AuthenticationChallengeCompleted), one of the arguments that receives is a `result` argument containing things like the user data (if successfully authenticated).

You could try to set up a waiting thread and wait for the event to save the result to a session prop or something, but the simpler way to get the result you need is probably to split up your logic into several functions in a project library. The first part would do some set up, start the authentication challenge and that's it. Later, the auth challenge event script would call the second part itself.
