# Insert new users with script

**URL:** <https://forum.inductiveautomation.com/t/insert-new-users-with-script/12494>\
**Category:** Ignition\
**Created:** [December 22, 2016, 8:04pm UTC](https://forum.inductiveautomation.com/t/insert-new-users-with-script/12494 "2016-12-22T20:04:49Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 29, 2019, 10:16am UTC](https://forum.inductiveautomation.com/t/insert-new-users-with-script/12494/5 "2019-03-29T10:16:30Z")

</div>

I think it was this one...

> [@Add Users and Roles in Event Script](http://forum.inductiveautomation.com/t/add-users-and-roles-in-event-script/10381/2):
>
> Hi Adnan, You can do this if you set up your User Source with a type of Database, meaning that the user and role details are stored in a SQL database. You can then create a script to write directly to the correct tables: user details go in the auth\_users table, roles in the auth\_roles table and users are mapped to roles in the auth\_user\_rl table. The easiest thing to do is create a User Source with a type of Database and add a dummy user before looking at the tables to see how those details a…

---

_[View the full topic](https://forum.inductiveautomation.com/t/insert-new-users-with-script/12494)._
