Microsoft Graph integration

Microsoft 365: Users, Mail, Calendar, OneDrive, SharePoint Lists, Teams, Contacts

Help CentreConnectors

Overview

Microsoft Graph is the unified API for Microsoft 365 – Outlook mail and calendar, Teams chat, OneDrive and SharePoint files, Users and Groups via Azure AD, and Lists. The Automize Microsoft Graph connector covers the most common automation surface – read/send mail, schedule events, upload files, message Teams channels, manage users, and query SharePoint Lists.

  • Regions: Works against any Microsoft 365 tenant. Sovereign clouds (US Gov, China 21Vianet, Germany) need a different Graph endpoint – set it in the connection's Cloud field if you're not on commercial worldwide.
  • Plans: Any tenant with a Microsoft 365 / Azure AD subscription. Specific features (Teams, SharePoint, OneDrive) need the corresponding licenses on the user whose data you're touching.

Setting up the connection

Auth type: oauth2_pkce.

  1. In Entra ID, go to App registrations → New registration.
  2. Pick a name (e.g. Automize), set 'Accounts in this organizational directory only' (single-tenant) or 'Multitenant' depending on your needs.
  3. Set the Redirect URI shown in the Automize Microsoft Graph connector dialog (type: Web).
  4. On API permissions, add Microsoft Graph delegated permissions for the scopes you need (see below). Grant admin consent if your tenant requires it.
  5. Copy the Application (client) ID and create a Client Secret under Certificates & secrets.
  6. In Automize, open Settings → Connectors → Microsoft Graph → Add connection. Paste credentials, click Connect, sign in with the account whose data you'll automate.

Scopes required:

  • User.Read
  • Mail.Read
  • Mail.Send
  • Calendars.ReadWrite
  • Files.ReadWrite.All
  • Sites.ReadWrite.All
  • ChannelMessage.Send
  • Group.Read.All
  • offline_access

Find your credentials at https://entra.microsoft.com/.


Rate limits

Graph enforces per-app + per-tenant + per-resource throttles. Headlines: Mail ~30/min/user, Calendar ~60/min/user, Files ~600/min/app. The connector reads the Retry-After header on 429 / 503 and backs off accordingly. Heavy ingestion should use delta queries (Get Delta Mail/ Events) rather than re-listing on each run.


Data model

Graph is a unified surface over multiple Microsoft 365 services.

    User (Azure AD) ─┬─ Outlook Mail (folders, messages, attachments)
                     ├─ Outlook Calendar (events, attendees)
                     ├─ OneDrive (drive items: files, folders)
                     └─ Tasks (To Do)
    Group ─── Teams (channels ─── channel messages)
    Site (SharePoint) ─── Lists ─── List Items

user_id can be 'me' for the connected user, an Azure AD object ID, or
a UPN (user@domain). drive_id and site_id are explicit UUIDs.

Available operations

47 operations available. Click any row to jump to its detail.

OperationCategoryWhat it does
Create eventCalendarCreate a new calendar event via Microsoft Graph API with optional Teams meeting link.
Delete eventCalendarDelete a calendar event via Microsoft Graph API.
Get eventCalendarGet a calendar event by ID via Microsoft Graph API.
List eventsCalendarList calendar events via Microsoft Graph API.
Update eventCalendarUpdate a calendar event via Microsoft Graph API.
Create contactContactsCreate a new contact via Microsoft Graph API.
List contactsContactsList the user's contacts via Microsoft Graph API.
Create draftMailCreate a draft email message via Microsoft Graph API.
Forward mailMailForward an email message via Microsoft Graph API.
Get messageMailGet an email message by ID via Microsoft Graph API.
List mail foldersMailList mail folders via Microsoft Graph API.
List messagesMailList email messages in the user's mailbox via Microsoft Graph API.
Reply to mailMailReply to an email message via Microsoft Graph API.
Search messagesMailSearch email messages by keyword or OData filter via Microsoft Graph API.
Send mailMailSend an email via Microsoft Graph API with recipients, subject, and HTML body.
Create folderOneDriveCreate a new folder in OneDrive via Microsoft Graph API.
Delete drive itemOneDriveDelete a file or folder from OneDrive via Microsoft Graph API.
Download fileOneDriveDownload a file from OneDrive by item ID via Microsoft Graph API.
Get drive itemOneDriveGet a file or folder by ID from OneDrive via Microsoft Graph API.
List drive itemsOneDriveList items in the root of the user's OneDrive via Microsoft Graph API.
List folder contentsOneDriveList items in a specific OneDrive folder by path via Microsoft Graph API.
Search driveOneDriveSearch for files in OneDrive via Microsoft Graph API.
Create list itemSharePointCreate a new item in a SharePoint list via Microsoft Graph API.
Delete list itemSharePointDelete a SharePoint list item via Microsoft Graph API.
Get listSharePointGet a SharePoint list by ID via Microsoft Graph API.
Get list itemSharePointGet a SharePoint list item by ID via Microsoft Graph API.
Get root siteSharePointGet the root SharePoint site via Microsoft Graph API.
Get siteSharePointGet a SharePoint site by ID via Microsoft Graph API.
List list itemsSharePointList items in a SharePoint list via Microsoft Graph API.
List site listsSharePointList all lists on a SharePoint site via Microsoft Graph API.
Search sitesSharePointSearch SharePoint sites via Microsoft Graph API.
Update list itemSharePointUpdate a SharePoint list item via Microsoft Graph API.
Create channelTeamsCreate a new channel in a team via Microsoft Graph API.
Delete channelTeamsDelete a Teams channel via Microsoft Graph API.
Get channelTeamsGet a Teams channel by ID via Microsoft Graph API.
List channel membersTeamsList members of a Teams channel via Microsoft Graph API.
List channel messagesTeamsList messages in a Teams channel via Microsoft Graph API.
List channelsTeamsList channels in a team via Microsoft Graph API.
List chat messagesTeamsList messages in a chat via Microsoft Graph API.
List chatsTeamsList the user's chats via Microsoft Graph API.
List teamsTeamsList teams the user is a member of via Microsoft Graph API.
Reply to channel messageTeamsReply to a message in a Teams channel via Microsoft Graph API.
Send channel messageTeamsSend a message to a Teams channel via Microsoft Graph API.
Send chat messageTeamsSend a message in a 1:1 or group chat via Microsoft Graph API.
Get current userUsersGet the signed-in user's profile via Microsoft Graph API.
Get userUsersGet a user by ID or userPrincipalName via Microsoft Graph API.
List usersUsersList users in the organization via Microsoft Graph API.

Operations

Create channel

Create a new channel in a team via Microsoft Graph API.

ParameterRequiredTypeDescription
Team ID teamIdYestext
Channel name displayNameYestext
Description descriptionNotext
Team Id team_idYestext
Membershiptype membershipTypeNotext

Create contact

Create a new contact via Microsoft Graph API.

ParameterRequiredTypeDescription
First name givenNameYestext
Last name surnameNotext
Email addresses (JSON) emailAddressesNotextarea
Company companyNameNotext
Job title jobTitleNotext
Businessphones businessPhonesNotext

Create draft

Create a draft email message via Microsoft Graph API.

ParameterRequiredTypeDescription
Subject subjectYestext
Body (HTML) bodyYestextarea
To (comma-separated) toYestext
Torecipients toRecipientsNotext
Ccrecipients ccRecipientsNotext

Create event

Create a new calendar event via Microsoft Graph API with optional Teams meeting link.

ParameterRequiredTypeDescription
Subject subjectYestext
Start (JSON) startYestext
End (JSON) endYestext
Description bodyNotextarea
Location locationNotext
Attendees (JSON) attendeesNotextarea
Teams meeting isOnlineMeetingNoswitch

Tips

  • Send: subject, start:{dateTime, timeZone}, end:{dateTime, timeZone}, attendees:[{emailAddress:{address}, type:'required'}].

Create folder

Create a new folder in OneDrive via Microsoft Graph API.

ParameterRequiredTypeDescription
Folder name nameYestext
Parent path parent_pathNotext
Folder folderNotext
@Microsoft.Graph.Conflictbehavior @microsoft.graph.conflictBehaviorNotext

Tips

  • parent_id + name. conflictBehavior: rename, replace, or fail.

Create list item

Create a new item in a SharePoint list via Microsoft Graph API.

ParameterRequiredTypeDescription
Site ID siteIdYestext
List ID listIdYestext
Fields (JSON) fieldsYestextarea
Site Id site_idYestext
List Id list_idYestext

Tips

  • fields: {col1: 'value', col2: 123}. Use list metadata to know column types.

Delete channel

Delete a Teams channel via Microsoft Graph API.

ParameterRequiredTypeDescription
Team ID teamIdYestext
Channel ID channelIdYestext
Team Id team_idYestext
Channel Id channel_idYestext

Delete drive item

Delete a file or folder from OneDrive via Microsoft Graph API.

ParameterRequiredTypeDescription
Item ID item_idYestext

Delete event

Delete a calendar event via Microsoft Graph API.

ParameterRequiredTypeDescription
Event ID event_idYestext

Tips

  • Hard-deletes for the organiser; cancels for attendees.

Delete list item

Delete a SharePoint list item via Microsoft Graph API.

ParameterRequiredTypeDescription
Site ID siteIdYestext
List ID listIdYestext
Item ID itemIdYestext
Site Id site_idYestext
List Id list_idYestext
Item Id item_idYestext

Tips

  • Soft-deletes to the site's Recycle Bin.

Download file

Download a file from OneDrive by item ID via Microsoft Graph API.

ParameterRequiredTypeDescription
Item ID item_idYestext
Save to path save_pathYestext

Forward mail

Forward an email message via Microsoft Graph API.

ParameterRequiredTypeDescription
Message ID messageIdYestext
To (comma-separated) toYestext
Comment commentNotextarea
Message Id message_idYestext
Torecipients toRecipientsNotext

Tips

  • Forwards a message to new recipients. comment goes above the original.

Get channel

Get a Teams channel by ID via Microsoft Graph API.

ParameterRequiredTypeDescription
Team ID teamIdYestext
Channel ID channelIdYestext
Team Id team_idYestext
Channel Id channel_idYestext

Get drive item

Get a file or folder by ID from OneDrive via Microsoft Graph API.

ParameterRequiredTypeDescription
Item ID item_idYestext

Tips

  • Returns DriveItem metadata. Use Download Item for bytes.

Get event

Get a calendar event by ID via Microsoft Graph API.

ParameterRequiredTypeDescription
Event ID event_idYestext

Tips

  • Returns full event with attendees and response statuses.

Get list

Get a SharePoint list by ID via Microsoft Graph API.

ParameterRequiredTypeDescription
Site ID siteIdYestext
List ID listIdYestext
Site Id site_idYestext
List Id list_idYestext

Get list item

Get a SharePoint list item by ID via Microsoft Graph API.

ParameterRequiredTypeDescription
Site ID siteIdYestext
List ID listIdYestext
Item ID itemIdYestext
Site Id site_idYestext
List Id list_idYestext
Item Id item_idYestext

Get current user

Get the signed-in user's profile via Microsoft Graph API.

No input parameters.


Get message

Get an email message by ID via Microsoft Graph API.

ParameterRequiredTypeDescription
Message ID message_idYestext

Tips

  • Returns body in HTML by default. Set Prefer: outlook.body-content-type='text' for plain text.

Get root site

Get the root SharePoint site via Microsoft Graph API.

No input parameters.


Get site

Get a SharePoint site by ID via Microsoft Graph API.

ParameterRequiredTypeDescription
Site ID siteIdYestext
Site Id site_idYestext

Get user

Get a user by ID or userPrincipalName via Microsoft Graph API.

ParameterRequiredTypeDescription
User ID or UPN user_idYestext

Tips

  • user_id: 'me', UPN (alice@contoso.com), or Azure AD object ID.

List channel members

List members of a Teams channel via Microsoft Graph API.

ParameterRequiredTypeDescription
Team ID teamIdYestext
Channel ID channelIdYestext
Team Id team_idYestext
Channel Id channel_idYestext

List channel messages

List messages in a Teams channel via Microsoft Graph API.

ParameterRequiredTypeDescription
Team ID team_idYestext
Channel ID channel_idYestext

Tips

  • Channel messages, newest first. Use $top to limit page size.

List channels

List channels in a team via Microsoft Graph API.

ParameterRequiredTypeDescription
Team ID team_idYestext

Tips

  • team_id: Team ID. Returns standard, private, and shared channels.

List chat messages

List messages in a chat via Microsoft Graph API.

ParameterRequiredTypeDescription
Chat ID chatIdYestext
Chat Id chat_idYestext

List chats

List the user's chats via Microsoft Graph API.

No input parameters.

Tips

  • 1:1 + group chats the user is in. Returns chat IDs to use with Send Chat Message.

List contacts

List the user's contacts via Microsoft Graph API.

No input parameters.


List drive items

List items in the root of the user's OneDrive via Microsoft Graph API.

No input parameters.

Tips

  • List children of a drive folder. parent_id='root' for the drive root.

List events

List calendar events via Microsoft Graph API.

No input parameters.

Tips

  • Calendar events. Filter by start/end with $filter.
  • Use Get Delta Events for incremental sync.

List folder contents

List items in a specific OneDrive folder by path via Microsoft Graph API.

ParameterRequiredTypeDescription
Folder path folder_pathYestext

List list items

List items in a SharePoint list via Microsoft Graph API.

ParameterRequiredTypeDescription
Site ID siteIdYestext
List ID listIdYestext
Site Id site_idYestext
List Id list_idYestext

Tips

  • Expand fields with $expand=fields. $select=fields(select=col1,col2) to project.

List mail folders

List mail folders via Microsoft Graph API.

No input parameters.

Tips

  • Special well-known names: Inbox, Drafts, SentItems, DeletedItems, JunkEmail.

List messages

List email messages in the user's mailbox via Microsoft Graph API.

No input parameters.

Tips

  • folder_id: a folder ID from List Mail Folders, or a well-known name (e.g. inbox).
  • $top=50, $filter=receivedDateTime ge 2026-01-01.
  • Use Get Delta Messages for incremental sync instead of re-listing.

List site lists

List all lists on a SharePoint site via Microsoft Graph API.

ParameterRequiredTypeDescription
Site ID siteIdYestext
Site Id site_idYestext

List teams

List teams the user is a member of via Microsoft Graph API.

No input parameters.

Tips

  • Teams the connected user is a member of.

List users

List users in the organization via Microsoft Graph API.

No input parameters.

Tips

  • Filter via $filter (e.g. accountEnabled eq true). Page via @odata.nextLink.
  • Returns ~100 users per page; bulk listing of large tenants takes minutes.

Reply to channel message

Reply to a message in a Teams channel via Microsoft Graph API.

ParameterRequiredTypeDescription
Team ID teamIdYestext
Channel ID channelIdYestext
Message ID messageIdYestext
Reply body (HTML) bodyYestextarea
Team Id team_idYestext
Channel Id channel_idYestext
Message Id message_idYestext
Attachments attachmentsNotext

Reply to mail

Reply to an email message via Microsoft Graph API.

ParameterRequiredTypeDescription
Message ID message_idYestext
Reply text commentYestextarea
Message messageNotext

Tips

  • Reply or Reply-All to a message by its ID. Use sender's mailbox or 'me'.

Search drive

Search for files in OneDrive via Microsoft Graph API.

ParameterRequiredTypeDescription
Search query queryYestext

Search messages

Search email messages by keyword or OData filter via Microsoft Graph API.

ParameterRequiredTypeDescription
Search query $searchNotext
OData filter $filterNotext

Search sites

Search SharePoint sites via Microsoft Graph API.

ParameterRequiredTypeDescription
Search query queryYestext

Send channel message

Send a message to a Teams channel via Microsoft Graph API.

ParameterRequiredTypeDescription
Team ID team_idYestext
Channel ID channel_idYestext
Message body (JSON) bodyYestextarea
Attachments attachmentsNotext

Tips

  • body: {contentType:'html', content:'...'}. mentions[] for @ tags.

Send chat message

Send a message in a 1:1 or group chat via Microsoft Graph API.

ParameterRequiredTypeDescription
Chat ID chat_idYestext
Message body (JSON) bodyYestextarea
Attachments attachmentsNotext

Tips

  • chat_id from List Chats. body shape same as channel messages.

Send mail

Send an email via Microsoft Graph API with recipients, subject, and HTML body.

ParameterRequiredTypeDescription
To (comma-separated) toYestext
Subject subjectYestext
Body (HTML) bodyYestextarea
CC (comma-separated) ccNotext
Save to Sent Items saveToSentItemsNoswitch
Message messageNotext

Tips

  • message: {subject, body:{contentType:'html', content:'...'}, toRecipients:[{emailAddress:{address:'...'}}]}.
  • Set saveToSentItems=false to skip the Sent Items folder.

Errors

  • ErrorAccessDenied – Mail.Send permission missing or admin consent not granted.

Update event

Update a calendar event via Microsoft Graph API.

ParameterRequiredTypeDescription
Event ID event_idYestext
Subject subjectNotext
Start (JSON) startNotext
End (JSON) endNotext
Location locationNotext
Body bodyNotext
Attendees attendeesNotext

Tips

  • PATCH-style. Send only changing fields. Updates auto-send updated invites unless you set Prefer header.

Update list item

Update a SharePoint list item via Microsoft Graph API.

ParameterRequiredTypeDescription
Site ID siteIdYestext
List ID listIdYestext
Item ID itemIdYestext
Fields (JSON) fieldsYestextarea
Site Id site_idYestext
List Id list_idYestext
Item Id item_idYestext

Tips

  • PATCH-style on the fields object.

FAQ

Application permission vs delegated permission – which?
This connector uses delegated permissions (acts as the signed-in user). Application permissions need a different OAuth flow (client credentials, no user) and aren't currently exposed. Use delegated unless you're doing service-account automation that can't have a real user.
Why am I getting consent_required on a new tenant?
Admin consent is needed for some scopes (e.g. anything with .All). The tenant admin clicks Grant admin consent in the App registration's API permissions tab.
How do I get a SharePoint site_id?
List Sites with search=<site name>, or call Get Site by hostname: /sites/{hostname}:/sites/{path}. Returns the site ID for subsequent List/Get List operations.
Why is my Send Mail going to spam?
The sender's domain SPF/DMARC settings or the message body itself. Test with a clean text body first. Set replyTo to a monitored mailbox.
Can I use a service account without MFA?
Officially Microsoft requires MFA on all admin/service accounts. Use a Conditional Access policy to exempt the service account from MFA for specific IPs (Automize's outbound IP), or use a managed identity if Automize ran inside Azure (not currently the case).

Related connectors

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.