This repository contains a basic glossary CRUD Web API implemented in ASP.NET and secured with Auth0 using Role-Based Access Role (RBAC).

Check out the article Role-Based Authorization for ASP.NET Web APIs for more details.

To run this application:

  1. Clone the repo with the following command:

    git clone https://github.com/auth0-blog/glossary-rbac-web-api-aspnet.git
  2. Move to the glossary-rbac-web-api-aspnet folder

  3. Add your Auth0 domain, API identifier, Client ID, and Client Secret to the appsettings.json configuration file (see Registering the Web API with Auth0 and Configuring the client for more details).

  4. Type dotnet run in a terminal window to launch the Web API.

  5. Point your browser to https://localhost:5001/swagger to test the available endpoints and actions.

webapi-swagger-ui

Requirements: