We have upgraded the application from 7.2 to 8.2 Post restoration we were not able to connect to Sitecore admin console. For accessing executed a query to update the admin account password but somehow all user details are deleted. Is there any way, we can restore them through Sitecore console and without touching SQL Server database as we do not have access to database server.
2 Answers
Yes. But it may not be practical.
Your question shares very little detail about the volume of your userbase and so on. There is also no information on whether the machine key settings and password hashing algorithms are the same across your two instances.
However. The User Manager has an option to Serialize All Users. It will serialize the user information to disk. You could then Deserialize All Users on your target instance.
Just be aware that this will not transfer passwords across.
The better option would be, to move the ASP.NEY Membership SQL Tables from your source Core database to your destination Core database.
-
Thanks for your response. The volume of user base is around 10K but without password, even serialize/serialize would not suffice the requirement. The movement of ASP.NET Membership SQL Tables can be done using SQL client from source to destination where database resides Commented Feb 21, 2018 at 12:40
Yes, it is possible to do without touching SQL Server database. There is Sitecore KB article how to transfer user passwords between Sitecore instances. It was written for Sitecore 6.5. But as Sitecore 9 also is based on ASP.Net Membership then it should work too.
1) You need to move user using serialization(either builtin or Unicorn).
- Open User Manager on source instance
- Click "Serialize all users"
- Find serialized users files on disk
- Copy serialized users files to target instance
- Open User Manager on source instance
- Click "Revert all users"
2) Copy the TransferUserPasswords.aspx file to the \sitecore\admin folder of your solution. 3) Request the page using the URL as below:
<hostname>/sitecore/admin/TransferUserPasswords.aspx
4) Enter the connection strings of the source and target Core databases using appropriate text boxes.
5) Click the Refresh button to get the list of users that exist in both Core databases.
6) Use the <<< and >>> buttons to select or deselect users for password transferring.
7) Click the Transfer button.
P.S. Don't forget to backup your databases.
-
Hi Anton, we were trying this process but could not locate the TransferUsersPasswords.aspx file in system. Can you please help with exact location/process to get this file Commented Feb 21, 2018 at 14:57
-
@PushpendraVats Follow link in my answer. On that page you will be able to download source of this page– AntonCommented Feb 21, 2018 at 15:02
-
@Anton...Thanks for pointing out, I downloaded the file. As per the Kbarticle its transfer only SQL Membership Provider provided used by Sitecore. We have have other over 10k users created in website as well which too need to be updated. Any suggestion for that. Commented Feb 21, 2018 at 15:05
-
@PushpendraVats What do you mean under "other over 10k users"? Are they created by Sitecore? If no, are they created by ASP.net website with ASP.Net membership?– AntonCommented Feb 23, 2018 at 13:57