# Authenticate User Credentials but don't login or out in Perspective

**URL:** <https://forum.inductiveautomation.com/t/authenticate-user-credentials-but-dont-login-or-out-in-perspective/45311>\
**Category:** Ignition\
**Tags:** ignition80, scripting, perspective\
**Created:** [April 6, 2021, 8:29pm UTC](https://forum.inductiveautomation.com/t/authenticate-user-credentials-but-dont-login-or-out-in-perspective/45311 "2021-04-06T20:29:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeAllgood](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@MikeAllgood](https://forum.inductiveautomation.com/u/MikeAllgood)\
**Post date:** [April 6, 2021, 8:29pm UTC](https://forum.inductiveautomation.com/t/authenticate-user-credentials-but-dont-login-or-out-in-perspective/45311/1 "2021-04-06T20:29:30Z")

</div>

I have a use case where I need to have an authorized person (supervisor) OK a step in a QC process (failing or reworking a part an operator has entered data for). What I would like to do is have a popup display (login style view) where the supervisor could enter their credentials (username & password) and then have a script authenticate the supervisor’s creds against the Active Directory User Source.

I see a number of functions that can check if a user has a certain role or security level, but unfortunately everything I have found either queries for the current logged in user or there is no password parameter passed to the function to actually authenticate.

Is there a way to provide for a security popup that takes username and password, then have that information passed to the user source to authenticate the credentials, and only return an “authenticated” status? I could get the rest of what I need as long as I know the entered credentials are good for the supervisor.

Thanks!

BTW, I don’t want to logout the logged in operator as that would require the part’s data to be re-entered before the supervisor could fail the part. Then it would require the operator to log back in to resume processing parts.

Thanks again! 😃

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [April 7, 2021, 3:01pm UTC](https://forum.inductiveautomation.com/t/authenticate-user-credentials-but-dont-login-or-out-in-perspective/45311/2 "2021-04-07T15:01:11Z")

</div>

I think you could do something with [system.security.validateUser](https://docs.inductiveautomation.com/display/DOC80/system.security.validateUser).

It has a gateway scope, so if it doesn’t ‘just work’ you could use [system.util.sendRequest](https://docs.inductiveautomation.com/display/DOC80/system.util.sendRequest) to force the script to run in the gateway scope and return what you care about.

---

<div class="post-metadata">

**Author:** ![MikeAllgood](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@MikeAllgood](https://forum.inductiveautomation.com/u/MikeAllgood)\
**Post date:** [April 7, 2021, 3:16pm UTC](https://forum.inductiveautomation.com/t/authenticate-user-credentials-but-dont-login-or-out-in-perspective/45311/3 "2021-04-07T15:16:28Z")

</div>

Hey zacht,  
Thanks for the reply.  
I had seen that method but discounted it (unreasonably) when I saw the first version of it having a Vision Scope. Since I’m working in Perspective I simply stopped looking at it when I saw that. Should have kept reading! 😃  
I do appreciate the help!

---

<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:** [April 7, 2021, 4:31pm UTC](https://forum.inductiveautomation.com/t/authenticate-user-credentials-but-dont-login-or-out-in-perspective/45311/4 "2021-04-07T16:31:09Z")

</div>

> [@zacht](#):
>
> system.security.validateUser

I verified that this does work in Perspective.
