Microsoft Entra ID (formerly Azure AD) Users API

User accounts in the directory

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 /users List users in the directory · List users #
Ask an LLM
“How do I get a list of all the users in my Entra ID tenant?”
“Can I filter the user list to only accounts in one department or with a certain job title?”
Tell an agent
List all users in the directory.
List users matching {filter}.
POST /users Create a new user account · Create a user #
Ask an LLM
“How do I add a new employee account to Microsoft Entra ID through Graph?”
“Can I create a user that starts out disabled until their start date?”
Tell an agent
Create a new user {displayName} with sign-in name {userPrincipalName}.
Add a user named {givenName} {surname} with job title {jobTitle} and mail {mail}.
GET /users/{id} Look up a single user's profile · Get a user #
Ask an LLM
“How can I look up one user's profile by their sign-in name?”
“What details does the directory hold for a specific user account?”
Tell an agent
Get the profile of user {id}.
Look up the directory account for {id}.
PATCH /users/{id} Update an existing user's profile · Update a user #
Ask an LLM
“How do I change an existing user's job title or display name?”
“Can I disable sign-in for a user who already exists without deleting them?”
Tell an agent
Change the job title of user {id} to {jobTitle}.
Set account enabled to {accountEnabled} for existing user {id}.
DELETE /users/{id} Delete a user account · Delete a user #
Ask an LLM
“How do I remove a departed employee's account from the directory?”
“Can I delete a user by their user principal name instead of their object id?”
Tell an agent destructive · confirm first
Delete user {id} from the directory.
Remove the account belonging to {id}.
GET /users/{id}/manager Find a user's manager · Get a user's manager #
Ask an LLM
“Who does a particular employee report to?”
“Can I look up the manager assigned to a user in the directory?”
Tell an agent
Find the manager of user {id}.
Tell me who {id} reports to.
GET /users/{id}/directReports List a user's direct reports · List a user's direct reports #
Ask an LLM
“Which people report directly to a given manager?”
“How do I see everyone on a manager's team in Entra ID?”
Tell an agent
List the direct reports of user {id}.
Show everyone who reports to {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/azure-ad:azure-ad-users-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-users-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Graph API (Azure AD) Users API
  version: v1.0
  description: 'Microsoft Graph is the primary REST API for accessing Azure Active Directory

    (Microsoft Entra ID) and other Microsoft 365 services. Requests are sent to

    `https://graph.microsoft.com/v1.0/{resource}` and authenticated with OAuth 2.0

    bearer tokens issued by Microsoft Entra ID.'
  contact:
    name: Microsoft Graph
    url: https://docs.microsoft.com/en-us/graph/api/overview
servers:
- url: https://graph.microsoft.com/v1.0
  description: Microsoft Graph v1.0 endpoint
- url: https://graph.microsoft.com/beta
  description: Microsoft Graph beta endpoint
tags:
- name: Users
  description: User accounts in the directory
paths:
  /users:
    get:
      summary: List users
      operationId: listUsers
      tags:
      - Users
      parameters:
      - in: query
        name: $select
        schema:
          type: string
      - in: query
        name: $filter
        schema:
          type: string
      - in: query
        name: $top
        schema:
          type: integer
      responses:
        '200':
          description: A page of users
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    type: array
                    items:
                      $ref: '#/components/schemas/User'
      security:
      - oauth2:
        - User.Read.All
    post:
      summary: Create a user
      operationId: createUser
      tags:
      - Users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
      responses:
        '201':
          description: User created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
      security:
      - oauth2:
        - User.ReadWrite.All
  /users/{id}:
    parameters:
    - in: path
      name: id
      required: true
      schema:
        type: string
      description: User id or userPrincipalName
    get:
      summary: Get a user
      operationId: getUser
      tags:
      - Users
      responses:
        '200':
          description: User
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
      security:
      - oauth2:
        - User.Read.All
    patch:
      summary: Update a user
      operationId: updateUser
      tags:
      - Users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
      responses:
        '204':
          description: Updated
      security:
      - oauth2:
        - User.ReadWrite.All
    delete:
      summary: Delete a user
      operationId: deleteUser
      tags:
      - Users
      responses:
        '204':
          description: Deleted
      security:
      - oauth2:
        - User.ReadWrite.All
  /users/{id}/manager:
    parameters:
    - in: path
      name: id
      required: true
      schema:
        type: string
    get:
      summary: Get a user's manager
      operationId: getUserManager
      tags:
      - Users
      responses:
        '200':
          description: Manager
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
      security:
      - oauth2:
        - User.Read.All
  /users/{id}/directReports:
    parameters:
    - in: path
      name: id
      required: true
      schema:
        type: string
    get:
      summary: List a user's direct reports
      operationId: listDirectReports
      tags:
      - Users
      responses:
        '200':
          description: A list of direct reports
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    type: array
                    items:
                      $ref: '#/components/schemas/User'
      security:
      - oauth2:
        - User.Read.All
components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: string
        userPrincipalName:
          type: string
        displayName:
          type: string
        givenName:
          type: string
        surname:
          type: string
        mail:
          type: string
        jobTitle:
          type: string
        accountEnabled:
          type: boolean
  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: Read the signed-in user's profile
            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 applications
            Directory.Read.All: Read directory data
        clientCredentials:
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes:
            https://graph.microsoft.com/.default: Application permissions configured for the app