openapi: 3.1.0
info:
title: Microsoft 365 (Microsoft Graph API) Calendar Users API
description: 'Microsoft 365 productivity and collaboration data is accessed through
Microsoft Graph, a unified REST endpoint at https://graph.microsoft.com.
The v1.0 service exposes users, groups, mail, calendars, files (OneDrive),
Teams, SharePoint sites, and more. Authentication is via OAuth 2.0
bearer tokens (Microsoft Entra ID).
'
version: '1.0'
contact:
name: Microsoft Graph
url: https://learn.microsoft.com/en-us/graph/overview
servers:
- url: https://graph.microsoft.com/v1.0
description: Microsoft Graph v1.0
security:
- oauth2: []
tags:
- name: Users
paths:
/users:
get:
tags:
- Users
summary: List users in the organization
responses:
'200':
description: Users
post:
tags:
- Users
summary: Create a user
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/User'
responses:
'201':
description: User created
/users/{id}:
parameters:
- in: path
name: id
required: true
schema:
type: string
get:
tags:
- Users
summary: Get a user by id or userPrincipalName
responses:
'200':
description: User
patch:
tags:
- Users
summary: Update a user
responses:
'204':
description: Updated
delete:
tags:
- Users
summary: Delete a user
responses:
'204':
description: Deleted
components:
schemas:
User:
type: object
properties:
id:
type: string
displayName:
type: string
givenName:
type: string
surname:
type: string
mail:
type: string
userPrincipalName:
type: string
jobTitle:
type: string
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: Sign in and read user profile
User.ReadWrite.All: Read and write all users' full profiles
Group.Read.All: Read all groups
Mail.Read: Read user mail
Calendars.Read: Read user calendars
Files.Read.All: Read all files
Channel.ReadBasic.All: Read basic channel info
clientCredentials:
tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
scopes:
https://graph.microsoft.com/.default: Use app-registered Graph permissions