Importing/Exporting users/groups



Sorry, but I was not able to find an answer on aforementioned question, which is:

Is it possible to import/export users and groups in Episerver 7.1, while using SqlServerMembershipProvider and SqlServerRoleProvider by using CMS only means?

Oct 03, 2013 19:07

When using SqlServerMembershipProvider/RoleProvider, the users and groups are stored in .NET default tables, not EPiServer-specific tables. The tables are prefixed "aspnet_*" and the tables you need are called:

  • aspnet_Membership
  • aspnet_Roles
  • aspnet_Users
  • aspnet_UsersInRoles
  • aspnet_Profile

The import/export feature in EPiServer does not include users and groups (only Visitor Groups), but you could export these tables using the "Script table as.." tool in SQL Server Management Studio, and then run that script to insert the data in your target database.



Oct 03, 2013 20:30

Yes, this one of the last resorts, which I've could imagine to myself, but it does not address following possible issues:

1) Whatif somebody on target installation already added more users and/or roles that I have?

2) Still, security setup would not be transfered in that way :(

Let me exaplin a little bit: I am newcomer to EpiServer from Sitecore. Sitecore strongly discourages any direct database operations, and, actually, stores users and groups in the same way, as EpiServer does (using .NET default tables). But, Sitecore allows to export/import users and security... Maybe there is a way to accomplish this task with EpiServer?

Oct 04, 2013 7:45

You could hookup to Export/Import and add additional data to the package e.g. as described here:

However as mentioned in that blog post users are tricky to export/import since the Membership API does not support to retrieve the password in cleartext (which is obvisouly good for security reasons). And since EPiServer supports different kinds of providers it is not possible to access user data in a "lower" layer (e.g. database) than Membership API.

But if you are using a specific provider you could do it your self at a lower level for example as Arild suugests.

Oct 04, 2013 8:06

Thanks, just one quick question: - do EpiServer 7 still also include ACLs in Exported content?

Cause if yes, than your prior module seems to fullfill my needs completely (users password problem is known to me, it is also the same in Sitecore - user would be delivered, but in locked state and without any password), so actually, I do need only Roles to be exported /imported correctly to keep consistency over environments

Oct 04, 2013 8:24

Yes, the ACLs are still included.

Oct 04, 2013 8:26

Thanks. That's awesome and perfectly fits then in our CI strategy :)

Just some coding and we would be into business back

Oct 04, 2013 8:31
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.