Microsoft Products APIs Users API

User accounts and profiles in Microsoft Entra ID.

OpenAPI Specification

ms-products-users-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Microsoft Graph API (v1.0) Calendar Users API
  description: Unified Microsoft Graph REST API for accessing Microsoft 365, Entra ID (Azure AD), Outlook, OneDrive, Teams, Planner, and other services. All requests target the `https://graph.microsoft.com/v1.0` endpoint and use OAuth 2.0 (Microsoft identity platform) bearer tokens for authentication.
  version: 1.0.0
  contact:
    name: Microsoft Graph
    url: https://developer.microsoft.com/graph
  x-generated-from: https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0
  x-generated-by: claude-crawl-2026-05-08
servers:
- url: https://graph.microsoft.com/v1.0
  description: Microsoft Graph v1.0 production endpoint
security:
- oauth2: []
tags:
- name: Users
  description: User accounts and profiles in Microsoft Entra ID.
paths:
  /users:
    get:
      tags:
      - Users
      operationId: listUsers
      summary: List users in the directory
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
  /users/{userId}:
    get:
      tags:
      - Users
      operationId: getUser
      summary: Get a user by id or userPrincipalName
      parameters:
      - $ref: '#/components/parameters/UserId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Resource'
components:
  schemas:
    Resource:
      type: object
      additionalProperties: true
    Collection:
      type: object
      additionalProperties: true
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/Resource'
        '@odata.nextLink':
          type: string
  parameters:
    UserId:
      name: userId
      in: path
      required: true
      schema:
        type: string
      description: User id (object id) or userPrincipalName.
  securitySchemes:
    oauth2:
      type: oauth2
      description: 'Microsoft identity platform OAuth 2.0. Acquire access tokens from https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token and send as `Authorization: Bearer <token>`.'
      flows:
        authorizationCode:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes:
            https://graph.microsoft.com/.default: Default app permissions
        clientCredentials:
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes:
            https://graph.microsoft.com/.default: Default app permissions