Microsoft Entra ID (formerly Azure AD) Users.user API

The users.user API from Microsoft Entra ID (formerly Azure AD) — 4 operation(s) for users.user.

Business capability
Identity & Access Management BC-620.20

Operations 9

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 pull a list of every user account in my Entra ID tenant?”
“Can I search users by display name, and does that need the ConsistencyLevel header?”
Tell an agent
List the users in my directory.
Find users whose name matches {search}, sending ConsistencyLevel {consistency}.
POST /users Create a new user account · Create User #
Ask an LLM
“What's the minimum I need to supply to create a new employee account?”
“Can I set an initial password and force a change at first sign-in when I add a user?”
Tell an agent
Create user {display_name} with sign-in name {upn} and mail nickname {mail_nickname}.
Add a new enabled account for {display_name} as {upn} with password profile {password_profile}.
GET /users/{user-id} Get a user by object id · Get a user #
Ask an LLM
“How do I look up a single user's properties from their object id?”
“Why aren't all user properties returned by default, and how do I request extra ones?”
Tell an agent
Get user {user_id} by object id.
Show {fields} for the user with id {user_id}.
PATCH /users/{user-id} Update a user by object id · Update user #
Ask an LLM
“How do I change a user's job title or department using their object id?”
“Can I disable sign-in for an account without deleting it?”
Tell an agent
Set the job title of user id {user_id} to {job_title}.
Disable sign-in for user id {user_id} by setting accountEnabled to {enabled}.
DELETE /users/{user-id} Delete a user by object id · Delete a user #
Ask an LLM
“What happens to a user's mailbox and licenses when I delete their account?”
“Can a deleted user still be restored within 30 days?”
Tell an agent destructive · confirm first
Delete the user whose object id is {user_id}.
Offboard user id {user_id} by deleting the account.
GET /users(userPrincipalName='{userPrincipalName}') Get a user by sign-in name · Get a user #
Ask an LLM
“Can I fetch a user directly by their userPrincipalName instead of the object id?”
“What's the way to look up someone when all I know is their sign-in email address?”
Tell an agent
Get the user whose sign-in name is {upn}.
Look up {upn} by user principal name and show {fields}.
PATCH /users(userPrincipalName='{userPrincipalName}') Update a user by sign-in name · Update user #
Ask an LLM
“Can I patch a user's profile when I only have their userPrincipalName?”
“How do I change someone's mobile number addressing them by sign-in name?”
Tell an agent
Set the mobile phone for {upn} to {mobile}, addressing them by user principal name.
Update the display name of sign-in name {upn} to {display_name}.
DELETE /users(userPrincipalName='{userPrincipalName}') Delete a user by sign-in name · Delete a user #
Ask an LLM
“Is it possible to delete an account addressed by userPrincipalName rather than id?”
“If I remove a user by their sign-in name, are they still recoverable for a month?”
Tell an agent destructive · confirm first
Delete the account with user principal name {upn}.
Remove {upn} from the directory using their sign-in name.
GET /users/$count Count users in the directory · Get the number of the resource #
Ask an LLM
“How many user accounts does my tenant have?”
“What's the count of guest users, and is the ConsistencyLevel header needed for it?”
Tell an agent
Count all users in the directory.
Count users matching {filter} with ConsistencyLevel {consistency}.

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-user-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-user-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Users.user API
  version: v1.0
servers:
- url: https://graph.microsoft.com/v1.0/
  description: Core
security:
- azureaadv2: []
tags:


# --- truncated at 32 KB (730 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/azure-ad/refs/heads/main/openapi/azure-ad-users-user-api-openapi.yml