Forum Discussion

Qonnect's avatar
Qonnect
Copper Contributor
Jun 15, 2024
Solved

unresolvable roledefinitionId in roleEligibilitySchedules

I query roleManagement/directory/roleEligibilitySchedules to make an inventory of all assigned Entra ID roles through Priviledged Identity Management. Each role assignment has a property RoleDefin...
  • VasilMichev's avatar
    VasilMichev
    Jun 16, 2024
    roleDefinitionId within the roleEligibilitySchedule object matches the ID value of the role, not its templateId. Do an $expand when fetching the schedules to get the full set of properties:

    /roleManagement/directory/roleEligibilitySchedules?$expand=roleDefinition

    This will give you both the ID (irrelevant) and the templateId for the role. The latter you can use against the /roleManagement/directory/roleDefinitions/ endpoint to get the custom role name/details.

Resources