# Set User Security Pin Through Gateway Script

**URL:** <https://forum.inductiveautomation.com/t/set-user-security-pin-through-gateway-script/89834>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [May 2, 2024, 3:10pm UTC](https://forum.inductiveautomation.com/t/set-user-security-pin-through-gateway-script/89834 "2024-05-02T15:10:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ted\_Schlepuetz](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@Ted\_Schlepuetz](https://forum.inductiveautomation.com/u/Ted_Schlepuetz)\
**Post date:** [May 2, 2024, 3:10pm UTC](https://forum.inductiveautomation.com/t/set-user-security-pin-through-gateway-script/89834/1 "2024-05-02T15:10:27Z")

</div>

Is there a method for setting the user's security pin through scripting? We are able to add the users to a user source and set their information but would also like to set the security pin.

We are using version 8.1.38

---

<div class="post-metadata">

**Author:** ![Ted\_Schlepuetz](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@Ted\_Schlepuetz](https://forum.inductiveautomation.com/u/Ted_Schlepuetz)\
**Post date:** [June 6, 2024, 3:22pm UTC](https://forum.inductiveautomation.com/t/set-user-security-pin-through-gateway-script/89834/2 "2024-06-06T15:22:55Z")

</div>

editUser = system.user.getUser("project\_name"),

# set pin

editUser.set("user.pin", "9999")  
#save changes  
response=system.user.editUser("project\_name", editUser)

---

<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:** [June 6, 2024, 4:55pm UTC](https://forum.inductiveautomation.com/t/set-user-security-pin-through-gateway-script/89834/3 "2024-06-06T16:55:50Z")

</div>

Ted, please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).
