azureblog.co.uk
← cd ~/roles
// roles/entra · privileged

Directory WritersMicrosoft Entra built-in role

Can read and write basic directory information. For granting access to applications, not intended for users.

Role ID9360feb5-f418-4baa-8175-e2a00bac4301
PrivilegedYes. Microsoft marks this role as privileged.
Permissions42

Before you assign it

Microsoft labels this a privileged role, so make it eligible through PIM rather than permanent, require phishing-resistant MFA to activate it, and review who has it regularly.

What it can do

PermissionWhat it allows
microsoft.directory/applications/extensionProperties/updateUpdate extension properties on applications
microsoft.directory/contacts/createCreate contacts
microsoft.directory/groups/assignedLabels/updateUpdate the assigned labels property on groups of assigned membership type, excluding role-assignable groups
microsoft.directory/groups/assignLicenseAssign product licenses to groups for group-based licensing
microsoft.directory/groups/basic/updateUpdate basic properties on Security groups and Microsoft 365 groups, excluding role-assignable groups
microsoft.directory/groups/classification/updateUpdate the classification property on Security groups and Microsoft 365 groups, excluding role-assignable groups
microsoft.directory/groups/createCreate Security groups and Microsoft 365 groups, excluding role-assignable groups
microsoft.directory/groups/dynamicMembershipRule/updateUpdate the dynamic membership rule on Security groups and Microsoft 365 groups, excluding role-assignable groups
microsoft.directory/groups/groupType/updateUpdate properties that would affect the group type of Security groups and Microsoft 365 groups, excluding role-assignable groups
microsoft.directory/groups/members/updateUpdate members of Security groups and Microsoft 365 groups, excluding role-assignable groups
microsoft.directory/groups/onPremWriteBack/updateUpdate Microsoft Entra groups to be written back to on-premises with Microsoft Entra Connect
microsoft.directory/groups/owners/updateUpdate owners of Security groups and Microsoft 365 groups, excluding role-assignable groups
microsoft.directory/groups/reprocessLicenseAssignmentReprocess license assignments for group-based licensing
microsoft.directory/groups/settings/updateUpdate settings of groups
microsoft.directory/groups/visibility/updateUpdate the visibility property of Security groups and Microsoft 365 groups, excluding role-assignable groups
microsoft.directory/groupSettings/basic/updateUpdate basic properties on group settings
microsoft.directory/groupSettings/createCreate group settings
microsoft.directory/groupSettings/deleteDelete group settings
microsoft.directory/oAuth2PermissionGrants/basic/updateUpdate OAuth 2.0 permission grants
microsoft.directory/oAuth2PermissionGrants/createCreate OAuth 2.0 permission grants
microsoft.directory/servicePrincipals/appRoleAssignedTo/updateUpdate service principal role assignments
microsoft.directory/servicePrincipals/synchronization.cloudTenantToCloudTenant/credentials/manageManage cloud tenant to cloud tenant application provisioning secrets and credentials.
microsoft.directory/servicePrincipals/synchronization.cloudTenantToCloudTenant/jobs/manageStart, restart, and pause cloud tenant to cloud tenant application provisioning synchronization jobs.
microsoft.directory/servicePrincipals/synchronization.cloudTenantToCloudTenant/schema/manageCreate and manage cloud tenant to cloud tenant application provisioning synchronization jobs and schema.
microsoft.directory/servicePrincipals/synchronization.cloudTenantToExternalSystem/credentials/manageManage application provisioning secrets and credentials.
microsoft.directory/servicePrincipals/synchronization.cloudTenantToExternalSystem/jobs/manageStart, restart, and pause application provisioning synchronization jobs.
microsoft.directory/servicePrincipals/synchronization.cloudTenantToExternalSystem/schema/manageCreate and manage application provisioning synchronization jobs and schema.
microsoft.directory/servicePrincipals/synchronizationCredentials/manageManage application provisioning secrets and credentials
microsoft.directory/servicePrincipals/synchronizationJobs/manageStart, restart, and pause application provisioning synchronization jobs
microsoft.directory/servicePrincipals/synchronizationSchema/manageCreate and manage application provisioning synchronization jobs and schema
microsoft.directory/users/assignLicenseManage user licenses
microsoft.directory/users/basic/updateUpdate basic properties on users
microsoft.directory/users/createAdd users
microsoft.directory/users/disableDisable users
microsoft.directory/users/enableEnable users
microsoft.directory/users/invalidateAllRefreshTokensForce sign-out by invalidating user refresh tokens
microsoft.directory/users/inviteGuestInvite guest users
microsoft.directory/users/manager/updateUpdate manager for users
microsoft.directory/users/photo/updateUpdate photo of users
microsoft.directory/users/reprocessLicenseAssignmentReprocess license assignments for users
microsoft.directory/users/sponsors/updateUpdate sponsors of users
microsoft.directory/users/userPrincipalName/updateUpdate User Principal Name of users

Assign it

The role ID is the same in every tenant, so these work as they are. Make it eligible through PIM:

powershell13 lines
Connect-MgGraph -Scopes "RoleEligibilitySchedule.ReadWrite.Directory"
$user = Get-MgUser -UserId "jane.doe@contoso.com"
New-MgRoleManagementDirectoryRoleEligibilityScheduleRequest -BodyParameter @{
    Action           = "AdminAssign"
    Justification    = "Needs Directory Writers for <reason>"
    RoleDefinitionId = "9360feb5-f418-4baa-8175-e2a00bac4301"
    DirectoryScopeId = "/"
    PrincipalId      = $user.Id
    ScheduleInfo     = @{
        StartDateTime = (Get-Date).ToUniversalTime().ToString("o")
        Expiration    = @{ Type = "afterDuration"; Duration = "P180D" }
    }
}

Who already has it?

powershell3 lines
Connect-MgGraph -Scopes "RoleManagement.Read.Directory"
Get-MgRoleManagementDirectoryRoleAssignment -Filter "roleDefinitionId eq '9360feb5-f418-4baa-8175-e2a00bac4301'" -ExpandProperty Principal |
    ForEach-Object { $_.Principal.AdditionalProperties.displayName }

Related roles

Find the smallest role for a task →