# Import/Create multiple users under different organisational unit

**URL:** <https://forum.reportserver.net/t/import-create-multiple-users-under-different-organisational-unit/760>\
**Category:** ReportServer (EN)\
**Created:** [July 11, 2017, 5:48pm UTC](https://forum.reportserver.net/t/import-create-multiple-users-under-different-organisational-unit/760 "2017-07-11T17:48:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivam.panchal](https://forum.reportserver.net/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@shivam.panchal](https://forum.reportserver.net/u/shivam.panchal)\
**Post date:** [July 11, 2017, 5:48pm UTC](https://forum.reportserver.net/t/import-create-multiple-users-under-different-organisational-unit/760/1 "2017-07-11T17:48:57Z")

</div>

Hii, We are using community edition of RS and I have setup some dashboards, now, i want to create multiple users like 200 so that they can access the created dashboards. My question is that, is there any way to generate multiple users provided user-id and password which could be same, that they can change later. So, please let me know, if i can do this without creating those individually.

Thanks in Advance.

---

<div class="post-metadata">

**Author:** ![IF\_Eduardo](https://forum.reportserver.net/letter_avatar_proxy/v4/letter/i/94ad74/32.png) [@IF\_Eduardo](https://forum.reportserver.net/u/IF_Eduardo)\
**Post date:** [July 12, 2017, 7:59am UTC](https://forum.reportserver.net/t/import-create-multiple-users-under-different-organisational-unit/760/2 "2017-07-12T07:59:46Z")

</div>

Hi shivam,

for this, you would need scripting (only available in ee). Here is an example script which creates a user “sampleUser” with password “abcdef”, adding the user to the “exampleOU” organizational unit.  
If you want to stay with the community edition, you could execute your script during the trial period.

Another possibility would be, as you pointed out here: [https://forum.reportserver.net/viewtopic.php?id=903](https://forum.reportserver.net/viewtopic.php?id=903), to simulate an export with XML and then import the data.

```auto
import net.datenwerke.security.service.usermanager.UserManagerService;
import net.datenwerke.security.service.usermanager.entities.User;
import net.datenwerke.security.service.usermanager.entities.OrganisationalUnit;

UserManagerService userManagerService = GLOBALS.getRsService(UserManagerService.class);

/* create user */
User user = new User();
user.setUsername("sampleUser");
user.setFirstname("Sample");
user.setLastname("Test");
		
		
List<OrganisationalUnit> ouList = userManagerService.getOUsByName("ExampleOU");
for (OrganisationalUnit ou: ouList) {
	ou.addChild(user);
}
userManagerService.persist(user);
userManagerService.merge(user);
		
userManagerService.setPassword(user, "abcdef");

"User created";
```

Best regards,  
Eduardo
