Microsoft Active Directory Roles API

The Directory Roles API from Microsoft Active Directory — 2 operation(s) for directory roles.

GitHub OpenAPI
Business capability
Identity & Access Management BC-620.20

Operations 2

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 List activated directory roles · List activated directory roles in the tenant #
Ask an LLM
“Which administrator roles are activated in my tenant?”
“What directory roles exist for assigning admin privileges?”
Tell an agent
List the activated directory roles.
Show every admin role available in the tenant.
GET /directoryRoles/{id}/members List members of a directory role · List members of a directory role #
Ask an LLM
“Who are the members of a specific admin role?”
“Can I see which users hold a given directory role?”
Tell an agent
List the members of directory role {id}.
Show who holds admin role {id}.

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/active-directory:microsoft-active-directory-directory-roles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

active-directory-directory-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Active Directory (via Microsoft Graph)…………………
  description: 'Microsoft Active Directory / Microsoft Entra ID identity resources are

    accessed through the Microsoft Graph REST API at

    https://graph.microsoft.com. This specification covers core directory

    operations: users, groups, applications, service principals, directory

    roles, and group membership. Authentication is via Microsoft Entra ID

    OAuth 2.0 bearer tokens.'
  version: '1.0'
  contact:
    name: Microsoft Graph (Entra ID)
    url: https://docs.microsoft.com/en-us/graph/api/overview
servers:
- url: https://graph.microsoft.com/v1.0
  description: Microsoft Graph v1.0
security:
- oauth2: []
tags:
- name: Directory Roles
paths:
  /directoryRoles:
    get:
      tags:
      - Directory Roles
      summary: List activated directory roles in the tenant
      responses:
        '200':
          description: Directory roles
      operationId: getDirectoryRoles
      x-operation-id-source: derived
  /directoryRoles/{id}/members:
    parameters:
    - in: path
      name: id
      required: true
      schema:
        type: string
    get:
      tags:
      - Directory Roles
      summary: List members of a directory role
      responses:
        '200':
          description: Members
      operationId: getDirectoryRolesByIdMembers
      x-operation-id-source: derived
components:
  securitySchemes:
    oauth2:
      type: oauth2
      description: Microsoft Entra ID OAuth 2.0
      flows:
        authorizationCode:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes:
            User.Read.All: Read all users
            User.ReadWrite.All: Read and write all users
            Group.Read.All: Read all groups
            Group.ReadWrite.All: Read and write all groups
            Application.Read.All: Read all applications
            Application.ReadWrite.All: Read and write all applications
            Directory.Read.All: Read directory data
            Directory.ReadWrite.All: Read and write directory data
        clientCredentials:
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes:
            https://graph.microsoft.com/.default: Use app-registered Graph permissions