Microsoft Entra ID (formerly Azure AD) Directory Roles.scoped Role Membership API

The directoryRoles.scopedRoleMembership API from Microsoft Entra ID (formerly Azure AD) — 3 operation(s) for directoryroles.scopedrolemembership.

Business capability
Identity & Access Management BC-620.20

Operations 6

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 /directoryRoles/{directoryRole-id}/scopedMembers List scoped members of a directory role · List scopedMembers for a directory role #
Ask an LLM
“Who holds a directory role only within an administrative unit?”
“Which scoped role memberships exist for a given directory role?”
Tell an agent
List the scoped members of directory role {role}.
Show scoped memberships of role {role} matching {filter}.
POST /directoryRoles/{directoryRole-id}/scopedMembers Add a scoped member to a directory role · Create new navigation property to scopedMembers for directoryRoles #
Ask an LLM
“How do I grant someone a directory role scoped to one administrative unit?”
“Can I limit a role assignment to a single administrative unit?”
Tell an agent
Add {member} to role {role} scoped to administrative unit {unit}.
Create a scoped membership on role {role} for administrative unit {unit}.
GET /directoryRoles/{directoryRole-id}/scopedMembers/{scopedRoleMembership-id} Get one scoped role membership · Get scopedMembers from directoryRoles #
Ask an LLM
“Which administrative unit is a specific scoped role membership limited to?”
“What are the details of one scoped member of a directory role?”
Tell an agent
Get scoped membership {membership} of role {role}.
Show the administrative unit and member for scoped membership {membership} on role {role}.
PATCH /directoryRoles/{directoryRole-id}/scopedMembers/{scopedRoleMembership-id} Update a scoped role membership · Update the navigation property scopedMembers in directoryRoles #
Ask an LLM
“How do I move an existing scoped role membership to a different administrative unit?”
“Can I change the member on an existing scoped role membership?”
Tell an agent
Change scoped membership {membership} on role {role} to administrative unit {unit}.
Update member info of scoped membership {membership} on role {role} to {member}.
DELETE /directoryRoles/{directoryRole-id}/scopedMembers/{scopedRoleMembership-id} Remove a scoped role membership · Delete navigation property scopedMembers for directoryRoles #
Ask an LLM
“How do I revoke someone's directory role within an administrative unit?”
“Can I delete a scoped role membership?”
Tell an agent destructive · confirm first
Remove scoped membership {membership} from role {role}.
Revoke the administrative-unit-scoped assignment {membership} on role {role}.
GET /directoryRoles/{directoryRole-id}/scopedMembers/$count Count scoped members of a directory role · Get the number of the resource #
Ask an LLM
“How many administrative-unit-scoped members does a directory role have?”
“What is the number of scoped role memberships for one role?”
Tell an agent
Count the scoped members of directory role {role}.
Give me the number of scoped memberships on role {role} matching {filter}.

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-directoryroles-scopedrolemembership-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-directoryroles-scopedrolemembership-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Identity.DirectoryManagement Directory Roles.scoped Role…
  version: v1.0
servers:
- url: https://graph.microsoft.com/v1.0/
  description: Core
security:
- azureaadv2: []
tags:
- name: directoryRoles.scopedRoleMembership
paths:
  /directoryRoles/{directoryRole-id}/scopedMembers:
    get:
      tags:
      - directoryRoles.scopedRoleMembership
      summary: List scopedMembers for a directory role
      description: Retrieve a list of scopedRoleMembership objects for a directory role.
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/directoryrole-list-scopedmembers?view=graph-rest-1.0
      operationId: directoryRole_ListScopedMember
      parameters:
      - name: directoryRole-id
        in: path
        description: The unique identifier of directoryRole
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: directoryRole
      - $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.scopedRoleMembershipCollectionResponse'
        default:
          $ref: '#/components/responses/error'
      x-ms-pageable:
        nextLinkName: '@odata.nextLink'
        operationName: listMore
      x-ms-docs-operation-type: operation
    post:
      tags:
      - directoryRoles.scopedRoleMembership
      summary: Create new navigation property to scopedMembers for directoryRoles
      operationId: directoryRole_CreateScopedMember
      parameters:
      - name: directoryRole-id
        in: path
        description: The unique identifier of directoryRole
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: directoryRole
      requestBody:
        description: New navigation property
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.scopedRoleMembership'
        required: true
      responses:
        2XX:
          description: Created navigation property.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.scopedRoleMembership'
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /directoryRoles/{directoryRole-id}/scopedMembers/{scopedRoleMembership-id}:
    get:
      tags:
      - directoryRoles.scopedRoleMembership
      summary: Get scopedMembers from directoryRoles
      description: Members of this directory role that are scoped to administrative units. Read-only. Nullable.
      operationId: directoryRole_GetScopedMember
      parameters:
      - name: directoryRole-id
        in: path
        description: The unique identifier of directoryRole
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: directoryRole
      - name: scopedRoleMembership-id
        in: path
        description: The unique identifier of scopedRoleMembership
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: scopedRoleMembership
      - 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.scopedRoleMembership'
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    patch:
      tags:
      - directoryRoles.scopedRoleMembership
      summary: Update the navigation property scopedMembers in directoryRoles
      operationId: directoryRole_UpdateScopedMember
      parameters:
      - name: directoryRole-id
        in: path
        description: The unique identifier of directoryRole
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: directoryRole
      - name: scopedRoleMembership-id
        in: path
        description: The unique identifier of scopedRoleMembership
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: scopedRoleMembership
      requestBody:
        description: New navigation property values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.scopedRoleMembership'
        required: true
      responses:
        2XX:
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.scopedRoleMembership'
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    delete:
      tags:
      - directoryRoles.scopedRoleMembership
      summary: Delete navigation property scopedMembers for directoryRoles
      operationId: directoryRole_DeleteScopedMember
      parameters:
      - name: directoryRole-id
        in: path
        description: The unique identifier of directoryRole
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: directoryRole
      - name: scopedRoleMembership-id
        in: path
        description: The unique identifier of scopedRoleMembership
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: scopedRoleMembership
      - 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
  /directoryRoles/{directoryRole-id}/scopedMembers/$count:
    get:
      tags:
      - directoryRoles.scopedRoleMembership
      summary: Get the number of the resource
      operationId: directoryRole.scopedMember_GetCount
      parameters:
      - name: directoryRole-id
        in: path
        description: The unique identifier of directoryRole
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: directoryRole
      - $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.scopedRoleMembershipCollectionResponse:
      description: Retrieved collection
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/microsoft.graph.scopedRoleMembershipCollectionResponse'
  schemas:
    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.ODataErrors.InnerError:
      type: object
      additionalProperties:
        type: object
      description: The structure of this object is service-specific
    microsoft.graph.scopedRoleMembership:
      allOf:
      - $ref: '#/components/schemas/microsoft.graph.entity'
      - title: scopedRoleMembership
        type: object
        properties:
          administrativeUnitId:
            type: string
            description: Unique identifier for the administrative unit that the directory role is scoped to
          roleId:
            type: string
            description: Unique identifier for the directory role that the member is in.
          roleMemberInfo:
            $ref: '#/components/schemas/microsoft.graph.identity'
        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.scopedRoleMembershipCollectionResponse:
      title: Collection of scopedRoleMembership
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/microsoft.graph.scopedRoleMembership'
        '@odata.nextLink':
          type:
          - string
          - 'null'
      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
    ODataCountResponse:
      type: integer
      format: int32
    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.ErrorDetails:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        target:
          type:
          - string
          - 'null'
      additionalProperties:
        type: object
  parameters:
    count:
      name: $count
      in: query
      description: Include count of items
      style: form
      explode: false
      schema:
        type: boolean
    search:
      name: $search
      in: query
      description: Search items by search phrases
      style: form
      explode: false
      schema:
        type: string
    skip:
      name: $skip
      in: query
      description: Skip the first n items
      style: form
      explode: false
      schema:
        minimum: 0
        type: integer
    top:
      name: $top
      in: query
      description: Show only the first n items
      style: form
      explode: false
      schema:
        minimum: 0
        type: integer
      example: 50
    filter:
      name: $filter
      in: query
      description: Filter items by property values
      style: form
      explode: false
      schema:
        type: string
  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: {}