> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/productivity/microsoft-graph.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# Microsoft Graph

Microsoft Graph covers Microsoft 365 data. Manage users, groups, mail, calendar events, contacts, drive files and app registrations.

![Microsoft Graph logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-8e72df2f82a39e6cb552a977161463c9d641b042%2Fmicrosoft-graph.png?alt=media)

|                    |                                                                                        |
| ------------------ | -------------------------------------------------------------------------------------- |
| **Category**       | [Productivity](https://docs.fastn.ai/connectors/catalog/productivity.md)               |
| **Website**        | [microsoft.com](https://microsoft.com)                                                 |
| **Authentication** | OAuth 2.0                                                                              |
| **Slug**           | `microsoftGraph`                                                                       |
| **On fastn.ai**    | [Embed Microsoft Graph in your product](https://fastn.ai/integrations/microsoft-graph) |

## Setup

Your customers sign in to Microsoft Graph through Fastn's own OAuth app, so nothing needs setting up first. To show your own app on the consent screen instead, add your OAuth app on the connector's **Auth** tab under **Manage providers**.

## Connect in Fastn

Your customers connect Microsoft Graph from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **Microsoft Graph**.
2. Select **Connect** on the Microsoft Graph card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Keep the **Default** auth provider, or choose your own OAuth app if you added one. Pick the **Scopes** you need, select **Authorize**, then sign in to Microsoft Graph and approve access in the window that opens.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-0e2bbdd7109cec207402cf6883484b8525b7fbf5%2Fconnect-oauth.png?alt=media" alt="The Connect Salesforce dialog for OAuth 2.0 with the Default auth provider, an optional account name, the Scopes selector and an Authorize button"><figcaption><p>A connect form for OAuth 2.0. Salesforce is shown here.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use Microsoft Graph's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Accept Event</td><td><code>acceptEvent</code></td><td>Accept a meeting invitation</td></tr><tr><td>Add Group Member</td><td><code>addGroupMember</code></td><td>Add a user to a group.</td></tr><tr><td>Add Message Attachment</td><td><code>addMessageAttachment</code></td><td>Add a file attachment to a draft message using base64 contentBytes.</td></tr><tr><td>Cancel Event</td><td><code>cancelEvent</code></td><td>Cancel an event as the organizer, sending a cancellation to attendees</td></tr><tr><td>Copy Message</td><td><code>copyMessage</code></td><td>Copy a message to another mail folder Returns the new message copy.</td></tr><tr><td>Create App Registration</td><td><code>createAppRegistration</code></td><td>Register a new application in Microsoft Entra ID Creates the application object that a service principal can then be created from. Requires Application.ReadWrite.All and is a tenant-level change, so run it only against a tenant you administer.</td></tr><tr><td>Create App Role Assignment</td><td><code>createAppRoleAssignments</code></td><td>Assign an app role of a resource application to a user, group or service principal This is how application permissions are granted to an app and how users are assigned to an enterprise application. Requires AppRoleAssignment.ReadWrite.All and grants privileges in the tenant.</td></tr><tr><td>Create Calendar</td><td><code>createCalendar</code></td><td>Create a new calendar in the default calendar group</td></tr><tr><td>Create Contact</td><td><code>createContact</code></td><td>Create an Outlook contact Requires Contacts.ReadWrite.</td></tr><tr><td>Create Drive Folder</td><td><code>createDriveFolder</code></td><td>Create a folder in OneDrive root Requires Files.ReadWrite.</td></tr></tbody></table>

<details>

<summary>View 106 more actions</summary>

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Create Event</td><td><code>createEvent</code></td><td>Create a new calendar event.</td></tr><tr><td>Create Forward Draft</td><td><code>createForward</code></td><td>Create a draft forward of a message to recipients Returns a draft message; does not send.</td></tr><tr><td>Create Group</td><td><code>createGroup</code></td><td>Create a new Microsoft 365 or security group.</td></tr><tr><td>Create Mail Folder</td><td><code>createMailFolder</code></td><td>Create a new mail folder under the mailbox root</td></tr><tr><td>Create Message (Draft)</td><td><code>createMessage</code></td><td>Create a draft email message in the signed-in user's mailbox Returns the created draft message resource.</td></tr><tr><td>Create Message Rule</td><td><code>createMessageRule</code></td><td>Create an inbox rule that moves messages from a sender to a target folder</td></tr><tr><td>Create OAuth2 Permission Grant</td><td><code>createOauth2PermissionGrants</code></td><td>Grant delegated permissions (OAuth2 scopes) from a resource API to a client service principal Consent can be granted for all users in the tenant or for a single user. Requires DelegatedPermissionGrant.ReadWrite.All and permanently changes what an application may do on behalf of users, so treat it as a privileged tenant change.</td></tr><tr><td>Create Reply Draft</td><td><code>createReply</code></td><td>Create a draft reply to a message Returns a draft message; does not send.</td></tr><tr><td>Create Reply-All Draft</td><td><code>createReplyAll</code></td><td>Create a draft reply-all to a message Returns a draft message; does not send.</td></tr><tr><td>Create Service Principal</td><td><code>createServicePrincipal</code></td><td>Create a service principal (enterprise application instance) in the tenant for an existing application registration The application must already be registered; pass its application (client) id. Requires Application.ReadWrite.All and changes tenant-level identity configuration.</td></tr><tr><td>Create Subscription</td><td><code>createSubscription</code></td><td>Create a Microsoft Graph change-notification subscription (webhook) for a resource such as me/messages or me/events notificationUrl must respond to Graph's validation token within 10s.</td></tr><tr><td>Create User</td><td><code>createUser</code></td><td>Create a new user in the organization.</td></tr><tr><td>Decline Event</td><td><code>declineEvent</code></td><td>Decline a meeting invitation</td></tr><tr><td>Delete Calendar</td><td><code>deleteCalendar</code></td><td>Delete a calendar</td></tr><tr><td>Delete Contact</td><td><code>deleteContact</code></td><td>Delete an Outlook contact Requires Contacts.ReadWrite.</td></tr><tr><td>Delete Drive Item</td><td><code>deleteDriveItem</code></td><td>Delete a OneDrive item Soft delete to recycle bin. Requires Files.ReadWrite.</td></tr><tr><td>Delete Event</td><td><code>deleteEvent</code></td><td>Delete a calendar event.</td></tr><tr><td>Delete Group</td><td><code>deleteGroup</code></td><td>Delete a group.</td></tr><tr><td>Delete Mail Folder</td><td><code>deleteMailFolder</code></td><td>Delete a mail folder</td></tr><tr><td>Delete Message</td><td><code>deleteMessage</code></td><td>Delete an email message.</td></tr><tr><td>Delete Message Attachment</td><td><code>deleteMessageAttachment</code></td><td>Delete an attachment from a message</td></tr><tr><td>Delete Subscription</td><td><code>deleteSubscription</code></td><td>Delete (unsubscribe) a change-notification subscription</td></tr><tr><td>Delete User</td><td><code>deleteUser</code></td><td>Delete a user from the organization.</td></tr><tr><td>Find Meeting Times</td><td><code>findMeetingTimes</code></td><td>Suggest meeting times for the signed-in user and one attendee based on availability and a meeting duration Returns candidate time slots with a confidence score. Requires Calendars.Read.Shared.</td></tr><tr><td>Forward Event</td><td><code>forwardEvent</code></td><td>Forward a meeting to additional recipients</td></tr><tr><td>Forward Message</td><td><code>forwardMessage</code></td><td>Forward a message to recipients and send immediately</td></tr><tr><td>Get Calendar</td><td><code>getCalendar</code></td><td>Get a calendar by id, or use 'calendar' for the default</td></tr><tr><td>Get Chat</td><td><code>getChat</code></td><td>Get a Teams chat by id</td></tr><tr><td>Get Contact</td><td><code>getContact</code></td><td>Get a single Outlook contact by id Requires Contacts.Read.</td></tr><tr><td>Get Drive</td><td><code>getDrive</code></td><td>Get the signed-in user's default OneDrive Requires Files.Read.</td></tr><tr><td>Get Drive Item</td><td><code>getDriveItem</code></td><td>Get a OneDrive item (file or folder) by id Requires Files.Read.</td></tr><tr><td>Get Drive Item By Path</td><td><code>getDriveItemByPath</code></td><td>Get a OneDrive item by path Requires Files.Read.</td></tr><tr><td>Get Event</td><td><code>getEvent</code></td><td>Get a specific calendar event by ID.</td></tr><tr><td>Get Group</td><td><code>getGroup</code></td><td>Get details of a specific group by group ID.</td></tr><tr><td>Get Mail Folder</td><td><code>getMailFolder</code></td><td>Get a mail folder by id or well-known name</td></tr><tr><td>Get Mailbox Settings</td><td><code>getMailboxSettings</code></td><td>Get the signed-in user's mailbox settings - time zone, language, automatic replies, working hours</td></tr><tr><td>Get Me</td><td><code>getMe</code></td><td>Get the profile of the currently signed-in user Supports $select to choose properties and $expand to include related entities such as the user's manager. Requires User.Read.</td></tr><tr><td>Get Message</td><td><code>getMessage</code></td><td>Get a specific email message by ID.</td></tr><tr><td>Get Message Attachment</td><td><code>getMessageAttachment</code></td><td>Get a single attachment of a message</td></tr><tr><td>Get My Drive</td><td><code>getMyDrive</code></td><td>Get the signed-in user's OneDrive Returns drive id, driveType, owner, quota.</td></tr><tr><td>Get My Manager</td><td><code>getMyManager</code></td><td>Get the signed-in user's manager Requires User.Read.All.</td></tr><tr><td>Get My Photo</td><td><code>getMyPhoto</code></td><td>Get the signed-in user's profile photo binary Returns image bytes; 404 if no photo set.</td></tr><tr><td>Get My Photo Metadata</td><td><code>getMyPhotoMetadata</code></td><td>Get profile photo metadata: id, height, width, contentType.</td></tr><tr><td>Get Root Site</td><td><code>getRootSite</code></td><td>Get the tenant root SharePoint site Requires Sites.Read.All.</td></tr><tr><td>Get Schedule</td><td><code>getSchedule</code></td><td>Get free/busy availability for a mailbox over a time window Returns an availability view string plus the mailbox's working hours. Requires Calendars.Read.Shared.</td></tr><tr><td>Get Service Principal By App ID</td><td><code>getServicePrincipalByAppId</code></td><td>Get the service principal (enterprise application) for an application client id, including the OAuth2 delegated permissions and app roles it publishes ). Use it to inspect which permissions an app exposes before granting them. Requires Application.Read.All.</td></tr><tr><td>Get Site</td><td><code>getSite</code></td><td>Get a SharePoint site by site ID.</td></tr><tr><td>Get Site Root</td><td><code>getSiteRoot</code></td><td>Get the tenant root SharePoint site Returns site id, displayName, webUrl.</td></tr><tr><td>Get Subscription</td><td><code>getSubscription</code></td><td>Get a single change-notification subscription by id</td></tr><tr><td>Get Team</td><td><code>getTeam</code></td><td>Get a team's full settings Requires Team.ReadBasic.All.</td></tr><tr><td>Get Team Channel</td><td><code>getTeamChannel</code></td><td>Get a single channel in a Team</td></tr><tr><td>Get User</td><td><code>getUser</code></td><td>Get a specific user by object id or userPrincipalName Supports $select to choose properties and $expand to include related entities such as the user's manager. Requires User.Read.All.</td></tr><tr><td>List Calendar Groups</td><td><code>listCalendarGroups</code></td><td>List the user's calendar groups</td></tr><tr><td>List Calendar View</td><td><code>listCalendarView</code></td><td>List occurrences/events in the calendar within a time window, expanding recurring series</td></tr><tr><td>List Calendars</td><td><code>listCalendars</code></td><td>List all calendars for the signed-in user.</td></tr><tr><td>List Channel Messages</td><td><code>listChannelMessages</code></td><td>List messages in a team channel Requires ChannelMessage.Read.All.</td></tr><tr><td>List Channels</td><td><code>listChannels</code></td><td>List channels in a team Requires Channel.ReadBasic.All.</td></tr><tr><td>List Chat Messages</td><td><code>listChatMessages</code></td><td>List messages in a Teams chat Requires Chat.Read.</td></tr><tr><td>List Chats</td><td><code>listChats</code></td><td>List the signed-in user's Teams chats Requires Chat.ReadBasic.</td></tr><tr><td>List Child Folders</td><td><code>listChildFolders</code></td><td>List child folders of a mail folder</td></tr><tr><td>List Contacts</td><td><code>listContacts</code></td><td>List the signed-in user's Outlook contacts Requires Contacts.Read.</td></tr><tr><td>List Drive Root Children</td><td><code>listDriveRootChildren</code></td><td>List items in the root of the user's OneDrive Requires Files.Read.</td></tr><tr><td>List Drives</td><td><code>listDrives</code></td><td>List all drives available to the signed-in user Requires Files.Read.</td></tr><tr><td>List Event Instances</td><td><code>listEventInstances</code></td><td>List occurrences of a recurring event series within a time window</td></tr><tr><td>List Events</td><td><code>listEvents</code></td><td>List calendar events for the signed-in user.</td></tr><tr><td>List Folder Children</td><td><code>listFolderChildren</code></td><td>List children of a specific drive item / folder by id</td></tr><tr><td>List Folder Messages</td><td><code>listFolderMessages</code></td><td>List messages within a specific mail folder</td></tr><tr><td>List Group Members</td><td><code>listGroupMembers</code></td><td>List members of a group.</td></tr><tr><td>List Groups</td><td><code>listGroups</code></td><td>List all groups in the organization.</td></tr><tr><td>List Joined Teams</td><td><code>listJoinedTeams</code></td><td>List teams the signed-in user is a member of Requires Team.ReadBasic.All.</td></tr><tr><td>List Mail Folders</td><td><code>listMailFolders</code></td><td>List all mail folders in the signed-in user's mailbox.</td></tr><tr><td>List Message Attachments</td><td><code>listMessageAttachments</code></td><td>List attachments of a message</td></tr><tr><td>List Message Rules</td><td><code>listMessageRules</code></td><td>List inbox message rules</td></tr><tr><td>List Messages</td><td><code>listMessages</code></td><td>List email messages in the signed-in user's mailbox.</td></tr><tr><td>List My Chats</td><td><code>listMyChats</code></td><td>List the signed-in user's Teams chats Use $top to page.</td></tr><tr><td>List My Direct Reports</td><td><code>listMyDirectReports</code></td><td>List the signed-in user's direct reports Requires User.Read.All.</td></tr><tr><td>List Organizations</td><td><code>listOrganizations</code></td><td>List the organization (tenant) resource for the signed-in user's Microsoft Entra ID tenant, including tenant id, display name, verified domains and assigned service plans. The collection always contains exactly one organization, so this also answers "which tenant am I connected to". Requires Organization.Read.All or User.Read.</td></tr><tr><td>List Site Drives</td><td><code>listSiteDrives</code></td><td>List document libraries (drives) in a SharePoint site Requires Sites.Read.All.</td></tr><tr><td>List Site List Items</td><td><code>listSiteListItems</code></td><td>List items in a SharePoint list Requires Sites.Read.All.</td></tr><tr><td>List Site Lists</td><td><code>listSiteLists</code></td><td>List all lists in a SharePoint site.</td></tr><tr><td>List Sites</td><td><code>listSites</code></td><td>Search and list SharePoint sites.</td></tr><tr><td>List Subscriptions</td><td><code>listSubscriptions</code></td><td>List active Microsoft Graph change-notification subscriptions for the app/user</td></tr><tr><td>List Team Members</td><td><code>listTeamMembers</code></td><td>List members of a team Requires TeamMember.Read.All.</td></tr><tr><td>List User Direct Reports</td><td><code>listUserDirectReports</code></td><td>List the users and contacts who report directly to the specified user Accepts a user object id or userPrincipalName. Requires User.Read.All.</td></tr><tr><td>List Users</td><td><code>listUsers</code></td><td>List users in the organization Supports OData $select, $filter, $orderby, $search, $count and paging; the request always sends ConsistencyLevel: eventual so advanced queries such as $count and $search work. Requires User.Read.All.</td></tr><tr><td>Move Message</td><td><code>moveMessage</code></td><td>Move a message to another mail folder Returns the moved message with a new id.</td></tr><tr><td>Reauthorize Subscription</td><td><code>reauthorizeSubscription</code></td><td>Reauthorize a change-notification subscription after a reauthorizationRequired lifecycle event</td></tr><tr><td>Remove Group Member</td><td><code>removeGroupMember</code></td><td>Remove a user from a group.</td></tr><tr><td>Renew Subscription</td><td><code>renewSubscription</code></td><td>Renew (extend the expiration of) a change-notification subscription</td></tr><tr><td>Reply To Message</td><td><code>replyMessage</code></td><td>Reply to the sender of a message and send immediately</td></tr><tr><td>Reply-All To Message</td><td><code>replyAllMessage</code></td><td>Reply to all recipients of a message and send immediately</td></tr><tr><td>Search Drive Items</td><td><code>searchDriveItems</code></td><td>Search the user's OneDrive for items matching a query ).</td></tr><tr><td>Search Sites</td><td><code>searchSites</code></td><td>Search SharePoint sites by keyword Requires Sites.Read.All.</td></tr><tr><td>Send Channel Message</td><td><code>sendChannelMessage</code></td><td>Post a message to a team channel Requires ChannelMessage.Send.</td></tr><tr><td>Send Chat Message</td><td><code>sendChatMessage</code></td><td>Send a message to an existing Teams chat Requires ChatMessage.Send.</td></tr><tr><td>Send Draft Message</td><td><code>sendDraftMessage</code></td><td>Send an existing draft message</td></tr><tr><td>Send Mail</td><td><code>sendMail</code></td><td>Send an email from the signed-in user's mailbox.</td></tr><tr><td>Tentatively Accept Event</td><td><code>tentativelyAcceptEvent</code></td><td>Tentatively accept a meeting invitation</td></tr><tr><td>Update Calendar</td><td><code>updateCalendar</code></td><td>Update a calendar's name or color</td></tr><tr><td>Update Contact</td><td><code>updateContact</code></td><td>Update an Outlook contact Requires Contacts.ReadWrite.</td></tr><tr><td>Update Event</td><td><code>updateEvent</code></td><td>Update an existing calendar event.</td></tr><tr><td>Update Mail Folder</td><td><code>updateMailFolder</code></td><td>Rename a mail folder</td></tr><tr><td>Update Mailbox Settings</td><td><code>updateMailboxSettings</code></td><td>Update mailbox settings such as time zone or automatic replies</td></tr><tr><td>Update Message</td><td><code>updateMessage</code></td><td>Update writable properties of a message, e.g. mark read/unread, change subject, importance, categories, or isDraft body</td></tr><tr><td>Update User</td><td><code>updateUser</code></td><td>Update properties of a user.</td></tr><tr><td>Upload Drive File</td><td><code>uploadDriveFile</code></td><td>Upload (create/replace) a small file (&#x3C;=250MB) by path Body is raw file content. Requires Files.ReadWrite.</td></tr></tbody></table>

</details>

## Events

Start a workflow when one of these happens, with an [app event trigger](https://docs.fastn.ai/build/integrations/triggers.md).

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>Calendar Event Created</td><td><code>event.created</code></td><td>A new calendar event was created (resource me/events, changeType created).</td></tr><tr><td>Calendar Event Deleted</td><td><code>event.deleted</code></td><td>A calendar event was deleted (resource me/events, changeType deleted).</td></tr><tr><td>Calendar Event Updated</td><td><code>event.updated</code></td><td>A calendar event was updated (resource me/events, changeType updated).</td></tr><tr><td>Message Created</td><td><code>message.created</code></td><td>A new message arrived in the user's mailbox (resource me/messages, changeType created).</td></tr><tr><td>Message Deleted</td><td><code>message.deleted</code></td><td>A message was deleted (resource me/messages, changeType deleted).</td></tr><tr><td>Message Updated</td><td><code>message.updated</code></td><td>A message was updated, e.g. read/flag change (resource me/messages, changeType updated).</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/productivity/microsoft-graph.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
