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

B2C IEF Keyset AdministratorMicrosoft Entra built-in role

Can manage secrets for federation and encryption in the Identity Experience Framework (IEF).

Role IDaaf43236-0c0d-4d5f-883a-6955382ac081
PrivilegedYes. Microsoft marks this role as privileged.
Permissions1

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/b2cTrustFrameworkKeySet/allProperties/allTasksRead and configure key sets in Azure Active Directory B2C

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 B2C IEF Keyset Administrator for <reason>"
    RoleDefinitionId = "aaf43236-0c0d-4d5f-883a-6955382ac081"
    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 'aaf43236-0c0d-4d5f-883a-6955382ac081'" -ExpandProperty Principal |
    ForEach-Object { $_.Principal.AdditionalProperties.displayName }

Related roles

Find the smallest role for a task →