How to Check Azure Application Permission in Azure AD

Author

Reads 1.3K

Security Logo
Credit: pexels.com, Security Logo

To check Azure application permission in Azure AD, you'll need to navigate to the Azure portal and select the Azure Active Directory service.

In the Azure AD blade, click on "Enterprise applications" to view a list of all applications registered in your directory.

Each application will have its own blade where you can view and manage its permissions.

To check the permissions for a specific application, click on the application name in the list and then click on the "Permissions" tab.

Azure AD Setup

Azure AD Setup is a crucial step in granting permissions to your Azure applications. You need to enable admin consent workflow in Azure AD to grant permissions through admin-consent.

To do this, you'll need to click on the "az ad app permission admin-consent" option, which will allow you to grant application and delegated permissions through admin-consent. This can be done using the Azure portal.

Here's a list of the required steps:

  1. Click on "Key vaults" in the Azure portal.
  2. Select a key vault from the list and click on "Access policies" on the left panel.
  3. Click on "+ Add Access Policy" and select "Get" and "List" for both "Key permissions" and "Secret permissions".
  4. Select the app registration you created and click on "Add".

Note that you'll need to repeat these steps for each key vault in the list. Additionally, you'll need to keep track of your Subscription ID, Active Directory ID, Application ID, and Key ID (the 24-month value you copied earlier).

Register in Azure

Credit: youtube.com, Azure AD App Registration in 4 Simple Steps

To register in Azure, log into the Azure portal. This is the first step in creating an app registration.

Click the search bar, and then click Azure Active Directory. If you can't find it, type "Azure Active Directory" in the search bar.

On the left panel, under Manage, click App registrations. This is where you'll create a new app registration.

Click + New registration, and enter a name for your app registration. You'll also need to click Register.

You'll need to copy the Application (client) ID and the Directory (tenant) ID to a text editor for later use. These IDs are important for future steps in the Azure AD setup process.

To generate a client secret, click on Certificates & secrets, and then click + New client secret. Enter a description and select 24 Months for the expiration date.

Permission Configuration

To configure permissions for your Azure application, you'll need to have a user account and a Global Administrator role. This allows you to manage user consent and configure various settings.

Credit: youtube.com, Azure Files - Assign Azure Permissions to Users/Groups That Require Access 11/13

You can manage user consent by choosing from four options: not allowing user consent, allowing users to consent for apps from verified publishers only, enabling admin consent workflow, or creating custom app consent policies via MS Graph.

To list API permissions the application has requested, use the `az ad app permission list` command, which can also be used to list OAuth2 permissions for an application. This command requires the identifier URI, application ID, or object ID of the associated application.

Here are the four options to manage user consent:

Grant Azure Key Vault Access

Granting Azure Key Vault access is a crucial step in permission configuration. You must grant certain permissions to access your Azure Key Vault in the Azure portal.

The permission model for your Key Vault is configured as vault access policy. If it's set to use Azure role-based access control, you should ignore these steps. You must repeat these steps for each of your key vaults.

Credit: youtube.com, How to Grant access to Key Vault|| add access policy and principal|| Azure tutorial||SC300

To grant permissions, click Key vaults in the Azure portal, then select a key vault from the list. On the left panel, click Access policies, and then click + Add Access Policy.

In the Key permissions field, select Get and List. In the Secret permissions field, select Get and List. You'll also need to select the app registration you created.

Here are the key details you'll need:

  • Subscription ID
  • Active Directory ID
  • Application ID
  • Key ID (the 24-month value you copied earlier)

Be sure to add the selected principal to the access policy, and then click Add.

Permission List

To view the permissions your application has requested, you can use the `az ad app permission list` command. This will list the OAuth2 permissions for an application.

You can also use the `az ad app permission list-grants` command to list OAuth2 permissions granted to the service principal. This command allows you to filter the results using an OData filter, such as `--filter "displayname eq 'test' and servicePrincipalType eq 'Application'"`.

Woman using a secure mobile app, showcasing data encryption on a smartphone.
Credit: pexels.com, Woman using a secure mobile app, showcasing data encryption on a smartphone.

The `az ad app permission list` command will also list the API permissions the application has requested, and you can use the identifier URI, application ID, or object ID of the associated application to narrow down the results.

If you want to list all the Oauth2 permission grants, you can use the `az ad app permission list-grants` command without any filters.

To get a better understanding of the permissions your application has requested, you can use the following table to compare the different commands:

Remember to replace the filter value with the actual value you want to use.

Openid Scope

The openid scope is a must-have for apps that sign in using OpenID Connect. It's requested on the work account consent page as the Sign you in permission.

This permission allows the app to receive a unique identifier for the user in the form of the sub claim. It also gives the app access to the UserInfo endpoint.

The openid scope can be used at the Microsoft identity platform token endpoint to acquire ID tokens. These tokens are used for authentication.

By using the openid scope, an app can sign users in securely and efficiently.

User Management

Credit: youtube.com, Azure Cloud: Assigning Permissions

To manage user consent for applications in Azure AD, you'll need a user account and a Global Administrator role.

You can configure user consent in Azure AD using the following options: do not allow user consent and group owner consent, allow users consent for apps from verified publishers only, enable admin consent workflow for app consent requests, or create custom app consent policies via MS Graph.

Here are the four options for managing user consent in Azure AD:

User Importance in Azure AD

User consent is crucial in Azure AD, as it determines what permissions third-party applications have to access your data.

Bad actors can create Azure-registered applications and ask for extensive permissions to access sensitive data, often under the guise of simplifying the authorization process.

Unaware users may fall into this trap by accepting all permission requests, allowing the app to steal sensitive business data.

One web app can use an Open Authentication framework to access another web app on behalf of the user.

Credit: youtube.com, Manage Users in Azure AD TestOut 5.4.8

This is why proper configuration of "User Consent to Applications configuration" in your Azure AD Directory (Entra ID) is necessary.

Reusing the same or similar password often can compromise third-party web apps, as well as user accounts and credentials.

Multifactor Authentication (MFA) may not protect against these types of attacks, as Open Authorizations take place after authentication and leverage legacy protocols where MFA no longer plays a role.

Configure Users

To configure users, you need to have a user account and a Global Administrator role. This allows you to manage user consent for applications in Azure AD (Entra ID).

Microsoft provides several options to manage user consent, including not allowing user consent and group owner consent, allowing users to consent for apps from verified publishers only, enabling admin consent workflow for app consent requests, and creating custom app consent policies via MS Graph.

You can manage user consent by selecting one of the following options: not allowing user consent and group owner consent, allowing users consent for apps from verified publishers only, enabling admin consent workflow for app consent requests, or creating custom app consent policies via MS Graph.

Credit: youtube.com, Manage Users in Azure Active Directory

To enable 'Allow users consent for apps from Microsoft verified publishers', you'll need to sign into your Azure portal, select 'Azure Active Directory' (Entra ID), browse to Enterprise Applications > Consent and Permissions > User Consent Settings, select the 'Allow users consent for apps from verified publishers' setting, and save your settings.

To enable 'Admin Consent Workflow', you'll need to sign into your Azure portal, browse to the Azure Active Directory > Enterprise Applications, click User Settings, select 'YES' for the 'User can request admin consent to apps they are unable to consent to', and save your settings.

Here are the steps to enable the 'Admin Consent Workflow' in a concise format:

Az Ad List

Az Ad List is a powerful tool for managing user permissions in Azure Active Directory. You can list API permissions an application has requested using az ad app permission list.

To do this, you'll need to provide the identifier URI, application ID, or object ID of the associated application.

Credit: youtube.com, Users and Groups in Azure Active Directory | Manage users and groups using GUI and AAD PowerShell

This command will list the OAuth2 permissions for an application, which is useful for understanding what permissions an application has access to.

You can also use az ad app permission list-grants to list OAuth2 permissions granted to a service principal. This is useful for seeing which users or applications have been granted specific permissions.

For example, you can use the --filter option to filter the results by display name and service principal type, as in az ad app permission list-grants --filter "displayname eq 'test' and serviceprincipaltype eq 'Application'".

Admin Roles and Permissions

Admin roles and permissions are crucial for Azure application permission. You can grant admin-consent to allow an application to access certain permissions.

To grant admin-consent, you can use the az ad app permission command. This will give the application the necessary permissions to access certain resources.

You can also grant permissions to access Azure Key Vault by following the steps outlined in the Azure portal. This involves creating an access policy that allows the application to get and list keys and secrets.

Credit: youtube.com, Provide access to azure resources using IAM (RBAC roles and permissions)

To do this, you'll need to select the Get and List permission in the Key permissions field and the Get and List permission in the Secret permissions field. Then, you'll need to select the principal (the app registration you created) and add it to the access policy.

Here are the key details you'll need to keep track of:

  • Subscription ID
  • Active Directory ID
  • Application ID
  • Key ID (the 24-month value you copied earlier)

Admin-Restricted Permissions

Admin-Restricted Permissions are a type of permission that requires admin approval to access sensitive company data.

These permissions are often required for higher-privilege Microsoft Graph permissions that can't be granted by individual users.

User.Read.All, Directory.ReadWrite.All, and Groups.Read.All are examples of admin-restricted permissions that require admin approval.

These types of permissions should only be used by daemon services and other non-interactive applications that run in the background.

If an application requests access to one of these permissions from an organizational user, the user receives an error message saying they're not authorized to consent to the app's permissions.

Here are some examples of admin-restricted permissions:

  • User.Read.All: Read all user's full profiles
  • Directory.ReadWrite.All: Write data to an organization's directory
  • Groups.Read.All: Read all groups in an organization's directory

Keep in mind that these permissions are restricted to prevent unauthorized access to sensitive company data.

Assign the Role

Credit: youtube.com, Privileged roles and permissions in Microsoft Entra ID (preview)

To assign the role, you need to create a role in Azure. You can do this by clicking on the "Subscriptions" tab and then clicking on "Access control (IAM)". From there, you can create a new role by clicking on the "Add" button and then selecting "Add role assignment".

To assign the role to your app registration, you need to follow these steps:

  1. In the Azure portal, click Subscriptions.
  2. In the Subscriptions blade, select the subscription you want to protect, and then click Access control (IAM).
  3. Click +Add, and then click Add role assignment.
  4. In the Role tab, search for the RBAC role you created, and then click View.
  5. Click the Members tab, and ensure the RBAC role you created is listed. If it is not listed, click + Select members to find the role.
  6. Click Review + assign.

You must repeat these steps for each subscription ID you have. If you have multiple subscriptions, you'll need to create a role for each one.

The role you create will be listed under the "Members" tab, and you can verify that it's been assigned correctly.

Enabling 'Do Not Allow User'

Enabling 'Do Not Allow User' consent is a crucial step in managing admin roles and permissions. You can do this in the Azure portal by selecting 'Do not allow user consent' under Enterprise Applications > Consent and Permissions > User Consent Settings.

Smiling Woman Holding Access Card over Reader
Credit: pexels.com, Smiling Woman Holding Access Card over Reader

To enable this setting, follow these steps: sign into your Azure portal, select 'Azure Active Directory' on the left panel, browse to Enterprise Applications, and then click on Consent and Permissions. From there, you can select the 'Do not allow user consent' setting.

This setting is particularly useful for organizations that require administrators to consent to permissions on behalf of users. By disabling user consent, you can ensure that only authorized personnel can grant access to sensitive company data.

To give you a better idea of what permissions require admin approval, here are a few examples: User.Read.All, Directory.ReadWrite.All, and Groups.Read.All. These permissions are considered admin-restricted and cannot be granted by users themselves.

By enabling 'Do not allow user' consent, you can help protect your organization's sensitive data and ensure that only authorized personnel have access to it.

Mona Renner

Senior Copy Editor

Mona Renner is a meticulous and detail-driven Copy Editor with a passion for refining complex concepts into clear and concise language. With a keen eye for grammar and syntax, she has honed her skills in editing articles across a range of technical topics, including Google Drive APIs. Her expertise lies in distilling technical jargon into accessible and engaging content that resonates with diverse audiences.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.