# Problem with Active Directory and validationUser

**URL:** <https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945>\
**Category:** Ignition\
**Created:** [January 4, 2021, 7:01pm UTC](https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945 "2021-01-04T19:01:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![fml\_z](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fml\_z](https://forum.inductiveautomation.com/u/fml_z)\
**Post date:** [January 4, 2021, 7:01pm UTC](https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945/1 "2021-01-04T19:01:49Z")

</div>

I was trying to apply a login with system.security.validationUser in the Script console with the Active Directory userSource, is it possible not ?, Because I put the username, password and UserSource but the return is false, I understand that if It returns false is because some credential is wrong but from what the client told me those are the credentials. What if I am interested in knowing if it is possible to use that command to log in from an active directory

---

<div class="post-metadata">

**Author:** ![jspecht](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jspecht/32/6465_2.png) [@jspecht](https://forum.inductiveautomation.com/u/jspecht)\
**Post date:** [January 4, 2021, 8:03pm UTC](https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945/2 "2021-01-04T20:03:22Z")

</div>

Which version of Ignition are you using?

Are you able to login with the same user source and same user credentials from the `Gateway Web Interface > Config > Users, Roles > Verify a User Source` tool?

---

<div class="post-metadata">

**Author:** ![fml\_z](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fml\_z](https://forum.inductiveautomation.com/u/fml_z)\
**Post date:** [January 30, 2021, 8:37pm UTC](https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945/3 "2021-01-30T20:37:07Z")

</div>

thanks,I did’t remember this.I was using 7.9.12.Other Question , is possible change the tag “RoleString” of System --\> Client --\> User ?

---

<div class="post-metadata">

**Author:** ![jspecht](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jspecht/32/6465_2.png) [@jspecht](https://forum.inductiveautomation.com/u/jspecht)\
**Post date:** [February 2, 2021, 8:19pm UTC](https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945/4 "2021-02-02T20:19:41Z")

</div>

I do not believe so. That tag represents the roles that the current user has. Only way it changes is if you switch users.

---

<div class="post-metadata">

**Author:** ![dhiraj.pawar](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiraj.pawar](https://forum.inductiveautomation.com/u/dhiraj.pawar)\
**Post date:** [May 28, 2024, 7:02am UTC](https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945/5 "2024-05-28T07:02:52Z")

</div>

Hello,  
Can you please confirm, is it possible we can validate user with Active Directory user Source by below function?

```python
system.security.validationUser()

```

I have tried by Gateway Web Interface \> Config \> Users, Roles \> Verify a User Source but its not working when selecting Active directory user source

---

<div class="post-metadata">

**Author:** ![jspecht](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jspecht/32/6465_2.png) [@jspecht](https://forum.inductiveautomation.com/u/jspecht)\
**Post date:** [May 28, 2024, 3:17pm UTC](https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945/6 "2024-05-28T15:17:20Z")

</div>

I believe you are looking for [system.security.validateUser](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-security/system-security-validateUser)

---

<div class="post-metadata">

**Author:** ![dhiraj.pawar](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiraj.pawar](https://forum.inductiveautomation.com/u/dhiraj.pawar)\
**Post date:** [May 29, 2024, 7:33am UTC](https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945/7 "2024-05-29T07:33:12Z")

</div>

Hi @jspecht ,  
yes, I want to validate user with below ignition function when selecting active directory internal SureSource.

```python
system.security.validateUser(currentUser, password,authProfile).

```

1. I have seen on ignition portal, Active directory user source fetch username but do not fetch password. so, Can you confirm whether it is possible? or can you suggest another way to validate user when selection active directory internal usersource?

---

<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:** [May 29, 2024, 11:57am UTC](https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945/8 "2024-05-29T11:57:59Z")

</div>

> [@dhiraj.pawar](#):
>
> but do not fetch password

Authentication systems are generally built with non-reversible salt+hash password storage. They simply **cannot** supply a password. A user must supply the password. That's the point of that system function--validate that a specific user is **present** for an operation while leaving the original user still logged in. (Like having a supervisor approve something.)

---

<div class="post-metadata">

**Author:** ![Amitkumar\_Ravat1](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@Amitkumar\_Ravat1](https://forum.inductiveautomation.com/u/Amitkumar_Ravat1)\
**Post date:** [November 16, 2024, 12:46pm UTC](https://forum.inductiveautomation.com/t/problem-with-active-directory-and-validationuser/41945/9 "2024-11-16T12:46:29Z")

</div>

I tried system.security.validateUser for Active directory but it validate based on name ( first + last name ) and password not username and password
