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

Attribute Assignment ReaderMicrosoft Entra built-in role

Read custom security attribute keys and values for supported Microsoft Entra objects.

Role IDffd52fa5-98dc-465c-991d-fc073eb59f8f
PrivilegedNo
Permissions6

What it can do

PermissionWhat it allows
microsoft.directory/attributeSets/allProperties/readRead all properties of attribute sets
microsoft.directory/azureManagedIdentities/customSecurityAttributes/readRead custom security attribute values for Microsoft Entra managed identities
microsoft.directory/customSecurityAttributeDefinitions/allProperties/readRead all properties of custom security attribute definitions
microsoft.directory/devices/customSecurityAttributes/readRead custom security attribute values for devices
microsoft.directory/servicePrincipals/customSecurityAttributes/readRead custom security attribute values for service principals
microsoft.directory/users/customSecurityAttributes/readRead custom security attribute values for 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 Attribute Assignment Reader for <reason>"
    RoleDefinitionId = "ffd52fa5-98dc-465c-991d-fc073eb59f8f"
    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 'ffd52fa5-98dc-465c-991d-fc073eb59f8f'" -ExpandProperty Principal |
    ForEach-Object { $_.Principal.AdditionalProperties.displayName }

Related roles

Find the smallest role for a task →