Skip to content

Ulysses Neves

Microsoft Entra ID, authentication, and hybrid identity troubleshooting.

Menu
  • Home
  • Microsoft Azure
  • Microsoft AD FS
  • Microsoft 365
  • Contact
  • Troubleshooting Index
Menu

Azure Access Control – Step by Step

Posted on August 2, 2019

Hello, everyone. Continuing our series on Azure resource security, we’ll talk about the access control feature in Azure, Identity Access Management (IAM), and demonstrate how to grant access to resources in Azure using the portal as well as PowerShell.

What Is Identity Access Management (IAM)?

Azure access control, better known as IAM, has the same functions as RBAC (Role-based Access Control), but it controls access to resources, resource groups, and subscriptions in Azure. Having an account in Microsoft Entra ID does not guarantee access to the resources available on this platform. To access Azure resources, you need to use RBAC (IAM) to allow access to the services available in Azure for each user.

For the demonstration, let’s consider the scenario below:
Resource to be granted access: rg-iam-lab
Resource Owner: Sara
Resource Contributor: IT Group; John

Click the resource whose access will be configured, and select the Access control (IAM) option.

Click Add to configure access to the rg-iam-lab resource group.

In the IAM console, click Add in the “Add a role assignment” menu.

To illustrate access, let’s grant Owner access to the user Sara.

Let’s grant Contributor access to the “IT Group” group.

Note: basically, the difference between the Owner and Contributor roles is that the latter doesn’t have permission to edit permissions.

We access the Azure portal with the user John, to whom we assigned the “Contributor” role for the rg-iam-lab resource group. Note below that, without the “Owner” role, the functions for adding and configuring permissions are disabled.

Now let’s check the options available for the user Sara, who has the “Owner” role on this Resource Group.

To better understand RBAC roles in Azure, access this link.

Controlling Access Using PowerShell

To demonstrate how to configure access using PowerShell, let’s consider the scenario below:
Resource to be granted access: rb-iam-lab-ps
Resource Owner: John
Resource Contributor: IT Group; Sara
Resource Reader: Fred

Open PowerShell and connect to Azure using the Connect-AzAccount command. If you haven’t yet configured the Azure module for PowerShell, access this post, where I show step by step how to configure it.

Let’s assign the “Owner” role to the user John by running the command:

Syntax: New-AzRoleAssignment -ResourceGroupName resource name -SignInName user@domain -RoleDefinitionName role

You can also assign access using the -Objectid parameter of the user or group in Azure.

To identify a group’s Objectid, run the command below:

To identify a user’s Objectid, run the command below:

Now let’s set the “Contributor” permission for the IT Group group and “Reader” for the user Fred using the Objectid attribute. Run the command below to assign access to the IT Group group:

Now let’s add the “Reader” permission for the user Fred on the rb-iam-lab-ps resource group using the command:

Syntax: New-AzRoleAssignment -ResourceGroupName resource name – -ObjectId object ID attribute -RoleDefinitionName role

Viewing Current Permissions on a Resource in PowerShell

You can check which permissions are granted to a resource by running the command:

Removing Permissions from a Resource

To illustrate how to delete a permission, let’s remove the “Read” access of the user Fred. To remove permissions from a resource, run the command:

By running the list command again, we can see that the user Fred no longer has permission on the resource group.

Controlling Access Using Azure CLI

Let’s configure the same access scenario as with PowerShell using Azure CLI commands, but in a new resource group called rb-iam-lab-acli, considering the permissions below:

Resource to be granted access: rb-iam-lab-acli
Resource Owner: John
Resource Contributor: IT Group; Sara
Resource Reader: Fred

To grant access to a resource in Azure using Azure CLI, let’s run the command below:

To assign the group permission, let’s identify the Objectid of the “IT Group” group using Azure CLI. Run the command:

Let’s copy the digits highlighted below to assign the access.

Now let’s assign the “Contributor” permission to the IT Group group using the command:

Let’s assign the user Fred “reader” access with the command:

For more information about how to create permissions on resources using Azure CLI, access this link.

Viewing Current Permissions on a Resource

You can check which permissions are granted to a resource by running the command:

Removing Permissions from a Resource

To illustrate how to delete a permission, let’s remove the “Read” access of the user Fred. To remove permissions from a resource, run the command:

By running the list command again, we can see that the user Fred no longer has permission on the resource group.

Summary

Well, everyone, in this post we covered quite a bit about controlling user and group access to a resource or resource group using Azure access control (IAM). We explained the concept and its application, and walked step by step through how to add, remove, and view access using the Azure portal, PowerShell, and Azure CLI.

In the next post, we’ll cover Azure Policy and how to apply it to resources to ensure the standardization of resources defined by the company.

I hope this content has contributed to enriching your knowledge of Azure.

Did you like the post? Like and share it.

If you have any suggestions or comments, leave a comment.

[ ]’s

Ulysses Neves

Related guides: Browse the Microsoft Identity Troubleshooting Index or the Microsoft Entra ID topic archive.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Microsoft Defender for Identity domain investigation: six questions to ask first September 10, 2026
  • Microsoft Entra Kerberos key rotation: what changes—and what administrators should check September 6, 2026
  • Microsoft Authenticator Will Block Jailbroken Devices in 2026 — What You Need to Know March 17, 2026
  • Enhancing Azure role activation security with FIDO2/Passkeys September 23, 2024
  • Microsoft Entra ID CAP | Enforcing WHfB using Authentication Strength April 21, 2024

Archives

  • September 2026
  • March 2026
  • September 2024
  • April 2024
  • February 2024
  • December 2023
  • September 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019

Tags

#aaddownleveldevice #adfs #adfscertificate #adfscertificates #adfsmfaadapter #azureauth #azureCA #azuredevice #capolicy #cloudsummit2021 #conditionalaccess #conditionalaccesspolicy #deviceregistration #farmbehavior #gopasswordless #mfaserver #msidentity #namedlocation #securingazure #securingazuread #sslprivatekey #troubleshootingadfs #troubleshootingwaptrust #tshootadfs #waptrust #webapplicationproxy #WHFBcerttrust #whfbdeployment #WHfBhybridsetup #WHfBprovisioning #widdatabase adconnect AD FS authenticationstrength az500 azurepim Azure security cloudsecurity microsoft365 Microsoft Azure Microsoft Entra hybrid join Microsoft Entra ID Microsoft Entra MFA PowerShell WHfB
©2026 Ulysses Neves | Design: Newspaperly WordPress Theme
Ulysses Neves
Gerenciar Consentimento de Cookies
Para fornecer as melhores experiências, usamos tecnologias como cookies para armazenar e/ou acessar informações do dispositivo. O consentimento para essas tecnologias nos permitirá processar dados como comportamento de navegação ou IDs exclusivos neste site. Não consentir ou retirar o consentimento pode afetar negativamente certos recursos e funções.
Funcional Always active
O armazenamento ou acesso técnico é estritamente necessário para a finalidade legítima de permitir a utilização de um serviço específico explicitamente solicitado pelo assinante ou utilizador, ou com a finalidade exclusiva de efetuar a transmissão de uma comunicação através de uma rede de comunicações eletrónicas.
Preferências
O armazenamento ou acesso técnico é necessário para o propósito legítimo de armazenar preferências que não são solicitadas pelo assinante ou usuário.
Estatísticas
O armazenamento ou acesso técnico que é usado exclusivamente para fins estatísticos. O armazenamento técnico ou acesso que é usado exclusivamente para fins estatísticos anônimos. Sem uma intimação, conformidade voluntária por parte de seu provedor de serviços de Internet ou registros adicionais de terceiros, as informações armazenadas ou recuperadas apenas para esse fim geralmente não podem ser usadas para identificá-lo.
Marketing
O armazenamento ou acesso técnico é necessário para criar perfis de usuário para enviar publicidade ou para rastrear o usuário em um site ou em vários sites para fins de marketing semelhantes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Ver preferências
  • {title}
  • {title}
  • {title}