title: How to add roles to users in ASP.NET with OWIN
body: <p>I'm new in ASP.NET and I'm making a simple project to practice. I started with a simple MVC project without authentication because it adds many code that I didn't understand.</p>
  
  <p>But now I want to add a membership to my sistem so I followed this guide:</p>
  
  <p><a href="http://benfoster.io/blog/aspnet-identity-stripped-bare-mvc-part-1" rel="nofollow">http://benfoster.io/blog/aspnet-identity-stripped-bare-mvc-part-1</a></p>
  
  <p><a href="http://benfoster.io/blog/aspnet-identity-stripped-bare-mvc-part-2" rel="nofollow">http://benfoster.io/blog/aspnet-identity-stripped-bare-mvc-part-2</a></p>
  
  <p>But I don't know where I can add a role to the user entity..</p>
  
  <p>My Startup class is this:</p>
  
  <pre><code>public class Startup
      {
          public static Func&lt;UserManager&lt;Usuario&gt;&gt; UserManagerFactory { get; private set; }
          public void Configuration(IAppBuilder app)
          {
              app.UseCookieAuthentication(new CookieAuthenticationOptions
              {
                  AuthenticationType = "ApplicationCookie"
              });
              UserManagerFactory = () =&gt;
                  {
                      var usermanager = new UserManager&lt;Usuario&gt;(new UserStore&lt;Usuario&gt;(new Vetpet3Context()));
                      usermanager.UserValidator = new UserValidator&lt;Usuario&gt;(usermanager)
                      {
                          AllowOnlyAlphanumericUserNames = false
                      };
                      return usermanager;
                  };
          }
      }
  </code></pre>
  
  <p>And I'm creating (for now) my users with this Action:</p>
  
  <pre><code>[HttpPost]
          public async Task&lt;ActionResult&gt; Register(RegisterModel model)
          {
              if (!ModelState.IsValid)
              {
                  return View();
              }
  
              var user = new Usuario
              {
                  UserName=model.correo,
                  correo = model.correo
              };
              var result = await userManager.CreateAsync(user, model.password);
              if (result.Succeeded)
              {
                  await SignIn(user);
                  return RedirectToAction("index", "Home");
              }
              foreach (var error in result.Errors)
              {
                  ModelState.AddModelError("", error);
              }
  
              return View();
          }
  </code></pre>
  
  <p>So everything works fine at this point, but I need to add different roles to the users , and this is the question, how I implement this part? I've read many guides but everyone does different things and I'm not sure how to add a role to my new users and how to claim these roles when they log in</p>