Muhammad Rehan Saeed
Muhammad Rehan Saeed

Reputation: 38527

Scope/Role/Group Based Access Control

I am using Azure Active Directory and am trying to understand the three types of access control described here. What are the advantages and disadvantages of each approach and when would you use them:

Upvotes: 13

Views: 6864

Answers (2)

MvdD
MvdD

Reputation: 23494

I think the most significant difference between scopes and roles/groups is who determines what the client is allowed to do.

  • Resource scopes are granted by the resource owner (the user) to an application through the consent screen. For example, the client application can post to my timeline or see my friends list.
  • User roles and groups are assigned by an administrator of the Azure AD directory. For example, the user can submit expense reports or the user can approve expense reports.

Scopes are typically used when an external application wants to gain access to the user's data via an exposed API. They determine what the client application can do.

Role- or group based access is typically used within an application to determine what a user can do.

Upvotes: 32

Dawid Rutkowski
Dawid Rutkowski

Reputation: 2756

Two most popular one:

  • Role Based Access Control - you are assigning roles to the users or groups in the your application configuration (inside Azure Portal). Then in code you can use those roles authorize users to certain parts of your application. You can do something line that: if (User.IsInRole("SuperAdmin")) {...}
  • Group based access control using the groupMembershipClaims - it's similar but you are checking if user belongs to specific group

Upvotes: 3

Related Questions