title: Authorization by Role/Group in ASP.NET using Auth0
body: <p>Thanks in advance for your help in this matter!</p>
  
  <p>I was hoping someone could help me figure out how to authorize API access by Group assigned in the Auth0 Authorization extension.</p>
  
  <p>I currently am using the [Authorize] attribute in the web api perfectly - it allows an api call if they have signed in successfully and blocks it if not. </p>
  
  <p>However, if I try [Authorize(Roles = "myGroupName")] authorization fails. Same occurs if I add it to the users app_metadata manually in the Users dashboard on the Auth0 website instead of assigning through the extension.</p>
  
  <p>My project is set up by following the Angular Quick Start and Asp.Net Quick Start. My webapiconfig where I validate the token server side is:</p>
  
  <pre><code> class WebApiConfig
  {
      public static void Register(HttpConfiguration configuration)
      {
          var clientID = WebConfigurationManager.AppSettings["auth0:ClientId"];
          var clientSecret = WebConfigurationManager.AppSettings["auth0:ClientSecret"];
  
          configuration.MessageHandlers.Add(new JsonWebTokenValidationHandler()
          {
              Audience = clientID,
              SymmetricKey = clientSecret
          });
  
          configuration.Routes.MapHttpRoute("API Default", "api/{controller}/{id}",
              new { id = RouteParameter.Optional });
      }
  }
  </code></pre>