Work with users, groups, and roles in custom apps and APIs

Microsoft Entra ID
Microsoft 365

Role-based access control (RBAC) is a popular mechanism to enforce authorization in applications. The administrator assigns roles to different users and groups to control who can access to what content and functionality. RBAC with Application Roles and Role Claims helps developers securely enforce authorization in their apps with little effort on their part. Another approach is to use Microsoft Entra groups and Group Claims. Learn how to use both Microsoft Entra groups and Application Roles to provide fine grained access control to an application.

Learning objectives

By the end of this module, you'll be able to:

  • Create a custom ASP.NET web app that is secured with Microsoft identity
  • Demonstrate how to obtain security groups as a claim in the token and use them in the app
  • Demonstrate how to use app roles to grant users access to an app


  • Basic knowledge of OAuth authentication flows and terminologies
  • Ability to develop with ASP.NET Core at the intermediate level
  • Experience using Visual Studio Code at the beginner level
  • Access to a Microsoft 365 tenant