Engineering · Common · Sitecore
Filter users by domain in Sitecore User Manager
Recently we ran into an issue with the Sitecore User Manager. We have more than 500k users, so finding a specific user was troublesome. We thought that if we could filter users by domain, it would be easier to find the right one.
We started with “UserManager.aspx” which is located under the path “\Website\sitecore\shell\Applications\Security\UserManager\UserManager.aspx”.
We decided not to touch the original file; instead, we copied it to create “UserManagerCustom.aspx”. We kept the file in our project and kept the same folder structure.

We changed the ASPX file’s inheritance to target our code-behind file:

In the code-behind, we override the OnLoad event of the UserManager class. We can get the code of the UserManager class from Sitecore.Client.dll -> Sitecore.Shell.Applications.Security.UserManager.

We added the following line to filter by domain:

The IsAllowedDomain method looks like this. The domain name (ExcludedDomainInUserManager) can be configured in the Web.config file.

Then we placed the “UserManagerCustom.aspx” file in the following directory:

The last task is to update the path in the “Core” database, at /sitecore/layout/Layouts/Security/SecurityManager:

Now, when we browse the User Manager, it shows users filtered by the domain we configured in the web.config.
Thanks
MH