Give a user an Entra admin role
In this task you'll give a user an Entra admin role.
Entra roles control the directory itself: users, groups, apps and sign-in settings. They're separate from the Azure roles in section 3, which control resources such as virtual machines.
Use the smallest role that does the job. For example, Helpdesk Administrator can reset ordinary users' passwords, and User Administrator can create and manage users, without the full power of Global Administrator.
Example. SS Kaiser gives its service desk the Helpdesk Administrator role, so staff can reset store workers' passwords. Only two people in the company are Global Administrators.
Before you start
You need: Privileged Role Administrator or Global Administrator. Time: 5 minutes.
Where to look
- Home
- Microsoft Entra ID
- Roles and administrators
- Helpdesk Administrator
- + Add assignments
Steps
- Open Microsoft Entra ID and select Roles and administrators. The page is titled All roles and shows your own role at the top.
- Search for Helpdesk and select Helpdesk Administrator.It's marked PRIVILEGED, like every role that can affect other people's sign-in. Treat it with care.
- Select + Add assignments.
- Pick Test User, then select Add.On a free tenant the role is given straight away and doesn't expire.
- Check that Test User now appears in the list for the role.
- To see every role one person has, open the user from Users and select Assigned roles.
Commands
# The Azure CLI has no command for Entra roles, so this uses Microsoft Graph.
# 1. Find the role's ID
ROLE=$(az rest --method get --url https://graph.microsoft.com/v1.0/roleManagement/directory/roleDefinitions \
--query "value[?displayName=='Helpdesk Administrator'].id" --output tsv)
# 2. Find the user's ID
USER=$(az ad user show --id test.user@<your-domain> --query id --output tsv)
# 3. Assign the role across the whole directory
az rest --method post --url https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments \
--body "{\"principalId\":\"$USER\",\"roleDefinitionId\":\"$ROLE\",\"directoryScopeId\":\"/\"}"
Watch out for
- Cost
- Assigning Entra roles is free. Time-limited roles with PIM need Entra ID P2.
- Security
- Keep Global Administrators to a handful of people, all with MFA. Every admin account is a target, so give each person the smallest role they need.
- Common mistakes
- Giving Global Administrator because it's quicker. Expecting an Entra role to give access to Azure resources: it doesn't, so use Azure roles (section 3) for that.
Clean up
- Roles and administrators
- Helpdesk Administrator
Tick Test User, select Remove assignments, then Yes.
Words to know
- Global Administrator
- The most powerful Entra role. It can change anything in the tenant.
- Entra role
- A set of permissions over the directory, such as managing users or resetting passwords.
- Privileged Identity Management (PIM)
- A way to give admin roles only for a short time when needed. Needs Entra ID P2.
Tick off each step and track your progress in the guide.
Open this task in Azure Portal, Hands On