Microsoft Entra ID (formerly Azure AD) Policies.unified Role Management Policy Assignment API

The policies.unifiedRoleManagementPolicyAssignment API from Microsoft Entra ID (formerly Azure AD) — 4 operation(s) for policies.unifiedrolemanagementpolicyassignment.

Business capability
Identity & Access Management BC-620.20

Operations 7

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /policies/roleManagementPolicyAssignments List PIM role management policy assignments · List roleManagementPolicyAssignments #
Ask an LLM
“Which role management policies are assigned to Entra roles and groups in PIM?”
“Can I filter PIM policy assignments by scope or role definition?”
Tell an agent
List all role management policy assignments in PIM.
Show PIM policy assignments matching {filter}.
POST /policies/roleManagementPolicyAssignments Create a role management policy assignment · Create new navigation property to roleManagementPolicyAssignments for policies #
Ask an LLM
“Can I link a role management policy to a role definition at a given scope?”
“What does a new PIM policy assignment need, such as policy id, role and scope?”
Tell an agent
Assign policy {policy} to role {role} at scope {scope}.
Create a PIM policy assignment for role {role} with scope type {scopeType}.
GET /policies/roleManagementPolicyAssignments/{unifiedRoleManagementPolicyAssignment-id} Get a PIM role management policy assignment · Get unifiedRoleManagementPolicyAssignment #
Ask an LLM
“What are the details of one PIM policy assignment for a role or group?”
“Which role and scope is a specific policy assignment tied to?”
Tell an agent
Get role management policy assignment {assignment}.
Show the role, scope and policy of PIM assignment {assignment}.
PATCH /policies/roleManagementPolicyAssignments/{unifiedRoleManagementPolicyAssignment-id} Update a role management policy assignment · Update the navigation property roleManagementPolicyAssignments in policies #
Ask an LLM
“Can I point an existing PIM policy assignment at a different policy?”
“Which fields of a role management policy assignment can be changed?”
Tell an agent
Change PIM assignment {assignment} to use policy {policy}.
Update the scope of policy assignment {assignment} to {scope}.
DELETE /policies/roleManagementPolicyAssignments/{unifiedRoleManagementPolicyAssignment-id} Delete a role management policy assignment · Delete navigation property roleManagementPolicyAssignments for policies #
Ask an LLM
“Can I remove a PIM policy assignment from a role?”
“What happens if I delete a role management policy assignment?”
Tell an agent destructive · confirm first
Delete role management policy assignment {assignment}.
Remove PIM policy assignment {assignment}.
GET /policies/roleManagementPolicyAssignments/{unifiedRoleManagementPolicyAssignment-id}/policy Get the policy behind a PIM policy assignment · Get policy from policies #
Ask an LLM
“Which role management policy and rules does a PIM assignment actually enforce?”
“Can I see the effective rules of the policy linked to an assignment?”
Tell an agent
Get the policy linked to PIM assignment {assignment}.
Show the policy and its rules for assignment {assignment}, expanding {expand}.
GET /policies/roleManagementPolicyAssignments/$count Count role management policy assignments · Get the number of the resource #
Ask an LLM
“How many role management policy assignments exist in PIM?”
“What is the total of PIM policy assignments across roles and groups?”
Tell an agent
Count all role management policy assignments.
Tell me how many PIM policy assignments there are.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/azure-ad:azure-ad-policies-unifiedrolemanagementpolicyassignment-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

azure-ad-policies-unifiedrolemanagementpolicyassignment-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Identity.SignIns Policies.unified Role Management Policy…
  version: v1.0
servers:
- url: https://graph.microsoft.com/v1.0/
  description: Core
security:
- azureaadv2: []
tags:
- name: policies.unifiedRoleManagementPolicyAssignment
paths:
  /policies/roleManagementPolicyAssignments:
    get:
      tags:
      - policies.unifiedRoleManagementPolicyAssignment
      summary: List roleManagementPolicyAssignments
      description: Get the details of all role management policy assignments made in PIM for Microsoft Entra roles and PIM for Groups.
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/policyroot-list-rolemanagementpolicyassignments?view=graph-rest-1.0
      operationId: policy_ListRoleManagementPolicyAssignment
      parameters:
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/skip'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/count'
      - name: $orderby
        in: query
        description: Order items by property values
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          $ref: '#/components/responses/microsoft.graph.unifiedRoleManagementPolicyAssignmentCollectionResponse'
        default:
          $ref: '#/components/responses/error'
      x-ms-pageable:
        nextLinkName: '@odata.nextLink'
        operationName: listMore
      x-ms-docs-operation-type: operation
    post:
      tags:
      - policies.unifiedRoleManagementPolicyAssignment
      summary: Create new navigation property to roleManagementPolicyAssignments for policies
      operationId: policy_CreateRoleManagementPolicyAssignment
      requestBody:
        description: New navigation property
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyAssignment'
        required: true
      responses:
        2XX:
          description: Created navigation property.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyAssignment'
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /policies/roleManagementPolicyAssignments/{unifiedRoleManagementPolicyAssignment-id}:
    get:
      tags:
      - policies.unifiedRoleManagementPolicyAssignment
      summary: Get unifiedRoleManagementPolicyAssignment
      description: Get the details of a policy assignment in PIM that's assigned to Microsoft Entra roles or group membership or ownership.
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/unifiedrolemanagementpolicyassignment-get?view=graph-rest-1.0
      operationId: policy_GetRoleManagementPolicyAssignment
      parameters:
      - name: unifiedRoleManagementPolicyAssignment-id
        in: path
        description: The unique identifier of unifiedRoleManagementPolicyAssignment
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: unifiedRoleManagementPolicyAssignment
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          description: Retrieved navigation property
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyAssignment'
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    patch:
      tags:
      - policies.unifiedRoleManagementPolicyAssignment
      summary: Update the navigation property roleManagementPolicyAssignments in policies
      operationId: policy_UpdateRoleManagementPolicyAssignment
      parameters:
      - name: unifiedRoleManagementPolicyAssignment-id
        in: path
        description: The unique identifier of unifiedRoleManagementPolicyAssignment
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: unifiedRoleManagementPolicyAssignment
      requestBody:
        description: New navigation property values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyAssignment'
        required: true
      responses:
        2XX:
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyAssignment'
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    delete:
      tags:
      - policies.unifiedRoleManagementPolicyAssignment
      summary: Delete navigation property roleManagementPolicyAssignments for policies
      operationId: policy_DeleteRoleManagementPolicyAssignment
      parameters:
      - name: unifiedRoleManagementPolicyAssignment-id
        in: path
        description: The unique identifier of unifiedRoleManagementPolicyAssignment
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: unifiedRoleManagementPolicyAssignment
      - name: If-Match
        in: header
        description: ETag
        style: simple
        schema:
          type: string
      responses:
        2XX:
          description: Success
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /policies/roleManagementPolicyAssignments/{unifiedRoleManagementPolicyAssignment-id}/policy:
    get:
      tags:
      - policies.unifiedRoleManagementPolicyAssignment
      summary: Get policy from policies
      description: The policy that's associated with a policy assignment. Supports $expand and a nested $expand of the rules and effectiveRules relationships for the policy.
      operationId: policy.roleManagementPolicyAssignment_GetPolicy
      parameters:
      - name: unifiedRoleManagementPolicyAssignment-id
        in: path
        description: The unique identifier of unifiedRoleManagementPolicyAssignment
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: unifiedRoleManagementPolicyAssignment
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          description: Retrieved navigation property
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicy'
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /policies/roleManagementPolicyAssignments/$count:
    get:
      tags:
      - policies.unifiedRoleManagementPolicyAssignment
      summary: Get the number of the resource
      operationId: policy.roleManagementPolicyAssignment_GetCount
      parameters:
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/filter'
      responses:
        2XX:
          $ref: '#/components/responses/ODataCountResponse'
        default:
          $ref: '#/components/responses/error'
components:
  responses:
    error:
      description: error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/microsoft.graph.ODataErrors.ODataError'
    ODataCountResponse:
      description: The count of the resource
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/ODataCountResponse'
    microsoft.graph.unifiedRoleManagementPolicyAssignmentCollectionResponse:
      description: Retrieved collection
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyAssignmentCollectionResponse'
  schemas:
    microsoft.graph.ODataErrors.InnerError:
      type: object
      additionalProperties:
        type: object
      description: The structure of this object is service-specific
    microsoft.graph.unifiedRoleManagementPolicyAssignment:
      allOf:
      - $ref: '#/components/schemas/microsoft.graph.entity'
      - title: unifiedRoleManagementPolicyAssignment
        type: object
        properties:
          policyId:
            type: string
            description: The id of the policy. Inherited from entity.
          roleDefinitionId:
            type:
            - string
            - 'null'
            description: For Microsoft Entra roles policy, it's the identifier of the role definition object where the policy applies. For PIM for Groups membership and ownership, it's either member or owner. Supports $filter (eq).
          scopeId:
            type: string
            description: The identifier of the scope where the policy is assigned. Can be / for the tenant or a group ID. Required.
          scopeType:
            type: string
            description: The type of the scope where the policy is assigned. One of Directory, DirectoryRole, Group. Required.
          policy:
            $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicy'
        additionalProperties:
          type: object
    microsoft.graph.ODataErrors.MainError:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
          x-ms-primary-error-message: true
        target:
          type:
          - string
          - 'null'
        details:
          type: array
          items:
            $ref: '#/components/schemas/microsoft.graph.ODataErrors.ErrorDetails'
        innerError:
          $ref: '#/components/schemas/microsoft.graph.ODataErrors.InnerError'
      additionalProperties:
        type: object
    microsoft.graph.unifiedRoleManagementPolicyAssignmentCollectionResponse:
      title: Collection of unifiedRoleManagementPolicyAssignment
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyAssignment'
        '@odata.nextLink':
          type:
          - string
          - 'null'
      additionalProperties:
        type: object
    microsoft.graph.directoryObject:
      allOf:
      - $ref: '#/components/schemas/microsoft.graph.entity'
      - title: directoryObject
        type: object
        properties:
          deletedDateTime:
            pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
            type:
            - string
            - 'null'
            description: Date and time when this object was deleted. Always null when the object hasn't been deleted.
            format: date-time
        additionalProperties:
          type: object
    microsoft.graph.identity:
      title: identity
      type: object
      properties:
        displayName:
          type:
          - string
          - 'null'
          description: The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        id:
          type:
          - string
          - 'null'
          description: Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
      additionalProperties:
        type: object
    microsoft.graph.ODataErrors.ODataError:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/microsoft.graph.ODataErrors.MainError'
      additionalProperties:
        type: object
    microsoft.graph.ODataErrors.ErrorDetails:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        target:
          type:
          - string
          - 'null'
      additionalProperties:
        type: object
    microsoft.graph.unifiedRoleManagementPolicyRule:
      allOf:
      - $ref: '#/components/schemas/microsoft.graph.entity'
      - title: unifiedRoleManagementPolicyRule
        type: object
        properties:
          target:
            $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyRuleTarget'
        additionalProperties:
          type: object
    microsoft.graph.entity:
      title: entity
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for an entity. Read-only.
      additionalProperties:
        type: object
    microsoft.graph.unifiedRoleManagementPolicyRuleTarget:
      title: unifiedRoleManagementPolicyRuleTarget
      type: object
      properties:
        caller:
          type:
          - string
          - 'null'
          description: 'The type of caller that''s the target of the policy rule. Allowed values are: None, Admin, EndUser.'
        enforcedSettings:
          type: array
          items:
            type:
            - string
            - 'null'
          description: The list of role settings that are enforced and cannot be overridden by child scopes. Use All for all settings.
        inheritableSettings:
          type: array
          items:
            type:
            - string
            - 'null'
          description: The list of role settings that can be inherited by child scopes. Use All for all settings.
        level:
          type:
          - string
          - 'null'
          description: 'The role assignment type that''s the target of policy rule. Allowed values are: Eligibility, Assignment.'
        operations:
          type: array
          items:
            $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyRuleTargetOperations'
          description: 'The role management operations that are the target of the policy rule. Allowed values are: All, Activate, Deactivate, Assign, Update, Remove, Extend, Renew.'
        targetObjects:
          type: array
          items:
            $ref: '#/components/schemas/microsoft.graph.directoryObject'
          x-ms-navigationProperty: true
      additionalProperties:
        type: object
    microsoft.graph.unifiedRoleManagementPolicy:
      allOf:
      - $ref: '#/components/schemas/microsoft.graph.entity'
      - title: unifiedRoleManagementPolicy
        type: object
        properties:
          description:
            type: string
            description: Description for the policy.
          displayName:
            type: string
            description: Display name for the policy.
          isOrganizationDefault:
            type:
            - boolean
            - 'null'
            description: This can only be set to true for a single tenant-wide policy which will apply to all scopes and roles. Set the scopeId to / and scopeType to Directory. Supports $filter (eq, ne).
          lastModifiedBy:
            $ref: '#/components/schemas/microsoft.graph.identity'
          lastModifiedDateTime:
            pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
            type:
            - string
            - 'null'
            description: The time when the role setting was last modified.
            format: date-time
          scopeId:
            type: string
            description: The identifier of the scope where the policy is created. Can be / for the tenant or a group ID. Required.
          scopeType:
            type: string
            description: The type of the scope where the policy is created. One of Directory, DirectoryRole, Group. Required.
          effectiveRules:
            type: array
            items:
              $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyRule'
            description: The list of effective rules like approval rules and expiration rules evaluated based on inherited referenced rules. For example, if there is a tenant-wide policy to enforce enabling an approval rule, the effective rule will be to enable approval even if the policy has a rule to disable approval. Supports $expand.
            x-ms-navigationProperty: true
          rules:
            type: array
            items:
              $ref: '#/components/schemas/microsoft.graph.unifiedRoleManagementPolicyRule'
            description: The collection of rules like approval rules and expiration rules. Supports $expand.
            x-ms-navigationProperty: true
        additionalProperties:
          type: object
    microsoft.graph.unifiedRoleManagementPolicyRuleTargetOperations:
      title: unifiedRoleManagementPolicyRuleTargetOperations
      enum:
      - all
      - activate
      - deactivate
      - assign
      - update
      - remove
      - extend
      - renew
      - unknownFutureValue
      type: string
    ODataCountResponse:
      type: integer
      format: int32
  parameters:
    top:
      name: $top
      in: query
      description: Show only the first n items
      style: form
      explode: false
      schema:
        minimum: 0
        type: integer
      example: 50
    skip:
      name: $skip
      in: query
      description: Skip the first n items
      style: form
      explode: false
      schema:
        minimum: 0
        type: integer
    filter:
      name: $filter
      in: query
      description: Filter items by property values
      style: form
      explode: false
      schema:
        type: string
    search:
      name: $search
      in: query
      description: Search items by search phrases
      style: form
      explode: false
      schema:
        type: string
    count:
      name: $count
      in: query
      description: Include count of items
      style: form
      explode: false
      schema:
        type: boolean
  securitySchemes:
    azureaadv2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes: {}