VBAuth
Technical White Paper
Controlling Access with Azure Entra App Roles:
Design, Planning, and Implementation
Peter Bryant — Corylus Business Systems | Andrew Richards — The IT Service Ltd
This is the third paper in the VBAuth security series. Paper 1 established why delegated permissions are the only safe model for Access applications calling the Microsoft Graph API. Paper 2 explained how endpoint-scoped app registrations give developers and clients precise control over permissions and audit events. This paper builds on both, introducing Azure Entra app roles as a further layer of access control.
1. What Are App Roles?
Most Access developers and IT administrators working in a Microsoft 365 environment are familiar with Active Directory groups. A user is added to a group — Finance, HR, Managers — and that group membership controls what network resources, shared drives, or mailboxes the user can access. The group exists in the directory, and the IT team manages it through their normal administrative tools.
Azure Entra app roles work on a similar principle, but they are scoped to a specific application rather than to the network as a whole. An app role is a custom role defined by the developer on an Azure Entra app registration. The IT team then assigns that role to specific users or groups. When an assigned user authenticates against that application, the role name appears as a claim inside their OAuth token.
This is an important distinction from AD groups. With group-based access control, an application typically has to query the directory to find out whether a user belongs to a relevant group — a separate lookup at runtime. With app roles, the evidence of authorisation travels inside the token itself. The application does not need to query anything. When VBAuth validates the token, it reads the role claims directly and permits or denies the operation accordingly.
An app role is to an application what an AD group is to a network resource — a named unit of access that the IT team assigns to the right people. The difference is that app roles are application-specific, developer-defined, and self-contained within the token.
App roles can be assigned to individual users or to Entra groups, including groups synchronised from on-premises Active Directory via Entra ID Connect. Where groups are synced from on-premises AD, membership continues to be managed on-premises as normal — the Entra app role assignment simply surfaces that group membership to the application at authentication time. Note that group-based assignment requires an Entra ID P1 or P2 licence; without it, roles must be assigned to individual users directly.
2. Why App Roles Matter
The preceding papers in this series established two layers of access control: delegated permissions ensure that every API call is made on behalf of an authenticated user, and endpoint-scoped registrations ensure that each operation carries only the permissions it needs. App roles add a third layer: they control which authenticated users are permitted to invoke which operations at all.
Without app roles, any user who can authenticate against an app registration can use every function that registration exposes. For low-sensitivity operations — sending a routine email, reading contacts — this may be entirely appropriate. But for operations that carry significant risk or require restricted access, allowing any authenticated user to proceed is not sufficient.
App roles close this gap. They allow the developer and the client’s IT team to specify, for each sensitive operation, exactly which users or groups are authorised to perform it. Access is granted by the IT team in their own Entra tenant, using their own administrative processes, without any change to the application code.
App roles move the access control decision out of the application and into the client’s identity infrastructure — where it belongs. The IT team grants access. The IT team revokes it. The developer’s code simply enforces the decision the token carries.
3. Case Study: Manage Entra Apps in the VBAuth Demo Database
The VBAuth demo database includes a feature called Manage Entra Apps. This feature allows a developer or nominated administrator to create, configure, and delete Azure Entra app registrations directly from within Access, using the Microsoft Graph API. It is a powerful administrative capability — the operations it performs affect the client’s Azure tenant directly and cannot easily be undone without manual intervention in the Entra portal.
This raises an obvious question: what prevents an ordinary user of the application from inadvertently — or deliberately — invoking this feature? The answer is an app role.
3.1 The VBAuth.Admin Role
A single app role named VBAuth.Admin is defined on the app registration that covers the Manage Entra Apps endpoint. When VBAuth authenticates a user for this operation, it validates the token and checks for the presence of the VBAuth.Admin role claim. If the claim is absent, the operation is denied before any API call is made. The user is informed that they do not have the required permissions.
Only users to whom the client’s IT team has explicitly assigned the VBAuth.Admin role can access this feature. The developer does not maintain a list of permitted users. The application does not contain any hard-coded user names or email addresses. Access is determined entirely by what the IT team has configured in their Entra tenant.
The Manage Entra Apps feature can only be used by someone the IT team has deliberately authorised. A user who discovers the feature in the application cannot use it. A user whose role is revoked loses access immediately, without any change to the application.
3.2 Why One Role Is Sufficient Here
The demo database defines only a single app role because it has only one operation that requires restricted access. The principle is that roles are defined to match real business requirements, not created speculatively. For a production application with multiple sensitive operations, each requiring a different user community, multiple roles would be appropriate. The VBAuth codebase includes the Graph API calls required to create app roles programmatically, so developers are free to extend the pattern to as many roles as their application requires.
4. Planning App Roles: Developer and Client Working Together
Defining app roles is a design conversation, not a technical one. It should take place between the developer and the client’s IT team before any implementation begins. The goal is to produce a clear plan that both parties understand and agree on: what operations exist, which ones require restricted access, what the role should be called, and who should hold it.
The following questions provide a useful framework for this conversation:
Which operations in the application carry significant risk if performed by the wrong person?
For each such operation, who should legitimately be able to perform it? Is this a named individual, a job function, or a department?
Does an existing AD group or Entra group already represent that community of users? If so, can the app role be assigned to that group?
How will new starters gain access, and how will leavers lose it? Is this handled by existing onboarding/offboarding processes?
Does the client’s Entra ID licence level support group-based assignment (P1 or P2), or will roles need to be assigned to individual users?
The output of this conversation can be captured in a simple planning table. An example based on the VBAuth demo database is shown below.
Operation / Endpoint Scope Claims App Role (if restricted) Intended User Community
Send email on behalf of user Mail.Send (none — all authenticated users) All staff
Read contacts Contacts.Read (none — all authenticated users) All staff
Manage Entra app registrations Application.ReadWrite.All Directory.ReadWrite.All VBAuth.Admin Named IT administrator(s) only
Table 1: Example app role planning table for the VBAuth demo database
In this example, two of the three operations require no app role — any authenticated user may perform them. Only the Manage Entra Apps operation is restricted, and the intended user community is narrow: one or two named IT administrators. This is the minimum necessary and is entirely appropriate for the risk level of the operation.
5. Implementation in the Microsoft Entra Admin Centre
Once the planning conversation is complete and the roles are agreed, the IT team implements them in the Microsoft Entra admin centre at https://entra.microsoft.com. No code changes are required. The process has two distinct phases: defining the role on the app registration, and assigning it to users or groups.
5.1 Defining the App Role
App roles are defined on the app registration itself, not on the enterprise application. The IT team navigates to the relevant app registration and defines the role with a display name, a description, and a value. The value is the string that will appear as a claim in the token — this is what VBAuth checks at runtime, so it must match exactly what the developer has specified in the application code.
The steps are:
Sign in to https://entra.microsoft.com as at least a Cloud Application Administrator.
Navigate to Identity → Applications → App registrations and select the relevant registration.
Select App roles from the left-hand menu, then Create app role.
Set the Display name (e.g. VBAuth Administrator), the Allowed member types (Users/Groups), the Value (e.g. VBAuth.Admin — must match the application code exactly), and a Description.
Select Apply to save the role.
The Value field is case-sensitive and must match exactly what the developer has specified. Agree this string with the developer before implementation — a mismatch means the role claim will never satisfy the check in the application code.
5.2 Assigning the Role to Users or Groups
Role assignment is performed through the Enterprise applications blade, not through the app registration. This is a common point of confusion — the role is defined on the registration, but assigned via Enterprise applications.
The steps are:
In the Entra admin centre, navigate to Identity → Applications → Enterprise applications and select the relevant application.
Select Users and groups from the left-hand menu, then Add user/group.
Search for and select the user or group to be assigned.
Under Select a role, choose the app role defined in the previous step.
Select Assign to complete the assignment.
The assignment takes effect at the user’s next authentication. There is no need to restart the application or notify VBAuth — the role claim will be present in the next token the user obtains for that registration.
To revoke access, the IT team removes the assignment from the Users and groups list. The change takes effect when the user’s current token expires (within 60 to 90 minutes) or immediately if the user re-authenticates.
5.3 Assigning to On-Premises AD Groups
Where the intended user community corresponds to an existing on-premises Active Directory group that is synchronised to Entra via Entra ID Connect, the IT team can assign the app role to that synced group rather than to individual users. Membership of the group continues to be managed through on-premises AD tooling in the normal way. Any change to group membership — adding a new starter, removing a leaver — is reflected in the token claims at the user’s next authentication without any further action in Entra.
This requires Entra ID P1 or P2 licensing. Where that licence is not available, roles are assigned directly to individual users as described above.
6. Summary
App roles are the third and final layer in the VBAuth access control model. Delegated permissions ensure every API call is bound to an authenticated user. Endpoint-scoped registrations limit each operation to the minimum permissions it requires. App roles determine which authenticated users are permitted to invoke each operation at all.
Together, these three layers give Access developers and their clients a security architecture that is genuinely layered and genuinely auditable. No single point of failure exposes the whole system. Each layer is controlled by a different party — the token by Microsoft Entra, the scopes by the developer in consultation with the client, and the role assignments by the client’s IT team in their own tenant.
App roles are not complex to implement. They require a short design conversation, agreement on a naming convention, and a handful of steps in the Entra admin centre. The return on that modest investment is fine-grained access control that integrates with the client’s existing identity management processes, requires no ongoing developer involvement, and leaves a clear audit trail of who was authorised to do what and when.
This series was prepared with AI assistance. The technical content has been reviewed and verified by the authors.
VBAuth, developed and maintained by Andrew Richards (The IT Service Ltd) and Peter Bryant (Corylus Business Systems), © 2025–2026. All rights reserved. https://vbauth.com