Custom user, role and initialization for ASP.NET Identity
Switch branches/tags
Nothing to show
Clone or download
Latest commit cfd3869 Apr 1, 2017
Failed to load latest commit information.
IdentityManagement Updated Namespaces Mar 31, 2017
RolesAdmin Initial Commit Mar 30, 2017
UsersAdmin Initial Commit Mar 30, 2017 Fixed Formatting Apr 1, 2017

Custom Identity Management

Custom user, role and initialization for ASP.NET MVC Identity

Custom Identity Management is an alternative to (but largely derived from) the Identity Sample NuGet package


  1. Copy the UsersAdmin and RolesAdmin folder to the Views folder

  2. Copy the IdentityManagement folder to the root of the web project

  3. Find and replace all instances of CustomIdentityManagement with the name of your web project

  4. Open the IdentityInitializer.cs file and update the default admin email and password at the top of the class

  5. Add the following to the ConfigureAuth(IAppBuilder app) method of the App_Start/Startup.Auth.cs file below the other app settings.



  1. Ensure that the DefaultConnection in the web.config file is pointing to the desired database
  2. Run the app and call the InitIdentity controller (


  1. To manage users call the UsersAdmin index view (
  2. To manage roles call the RolesAdmin index view (

@if (Request.IsAuthenticated && User.IsInRole("Admin"))
        <a href="@Url.Action("Index","UsersAdmin")">Users Admin</a>
        <a href="@Url.Action("Index","RolesAdmin")">Rules Admin</a>