Skip to content

Microsoft 365 Integration

Connect Microsoft 365 to access SharePoint, OneDrive, Outlook, Calendar, and Teams directly from your AI conversations.

MS365 Tool Search

Overview

The Microsoft 365 integration connects GPT Workbench to your organization's Microsoft ecosystem. Context blocks pull files from SharePoint and OneDrive into the AI's context, allowing it to reference your documents throughout a conversation. Tools give the AI the ability to search files, read and send emails, manage calendar events, and access Teams messages in real time.

This integration authenticates through Azure AD using the OAuth 2.0 protocol. GPT Workbench requests only the permissions necessary for the capabilities you enable, and all tool interactions are logged in the thread's message history.

Setup

Prerequisites

Before connecting Microsoft 365, ensure:

  • Your organization administrator has configured the Azure AD app registration credentials in Organization Settings > Integrations
  • You have a Microsoft 365 account (business or enterprise) with appropriate licenses
  • Your Azure AD tenant allows third-party application consent (or an admin has pre-approved the application)

Connecting Your Account

MS365 Setup Steps

  1. Go to Profile > Integrations
  2. Locate Microsoft 365 in the integrations list
  3. Click Connect
  4. A popup opens with the Microsoft sign-in page
  5. Enter your Microsoft 365 credentials
  6. Review the permissions being requested
  7. Click Accept
  8. The popup closes and GPT Workbench confirms the connection

The connection is immediate. SharePoint context blocks and Microsoft 365 tools become available in your threads right away.

Required Permissions

GPT Workbench requests the following Microsoft Graph API permissions:

PermissionPurpose
Files.Read.AllRead files in SharePoint and OneDrive
Mail.ReadWriteRead and send Outlook emails
Mail.SendSend emails on your behalf
Calendars.ReadWriteRead and create calendar events
ChannelMessage.Read.AllRead Teams channel messages
Sites.Read.AllBrowse SharePoint sites and libraries
User.ReadRead your basic profile information

Your Azure AD administrator may require admin consent for some of these permissions depending on your tenant's consent policy.

Context Blocks

Microsoft 365 context blocks pull files from SharePoint and OneDrive into the AI conversation. Files are downloaded, their content is extracted (using the same pipeline as document uploads), and the extracted text is included in the AI's context.

Adding a SharePoint Context Block

SharePoint File Browser

  1. Open your thread
  2. Click Manage Context
  3. Go to the Add New tab
  4. Click SharePoint
  5. Browse your SharePoint sites and document libraries
  6. Navigate through folders to find the file you need
  7. Select one or more files
  8. Optionally configure the cache duration
  9. Click Add Context

Supported File Formats

Files from SharePoint and OneDrive are processed through the same extraction pipeline as uploaded documents:

FormatExtraction
DOCXFull text extraction with structure preservation
PDFText extraction with OCR fallback for scanned documents
XLSXSpreadsheet data converted to structured text
PPTXSlide content extracted as sequential text
CSVRaw data preserved in tabular format
TXTDirect text inclusion

Cache Duration

SharePoint files are downloaded and cached for a configurable period. After the cache expires, files are re-downloaded on the next thread interaction.

DurationUse Case
1 hourFrequently updated documents (shared spreadsheets, living documents)
24 hoursStandard documents (reports, specifications, policies)
7 daysArchival content (completed project documentation, reference materials)

File Size Considerations

Large files consume significant tokens from the model's context window. When a file exceeds the token threshold, GPT Workbench displays a warning with the option to summarize the content. For very large files (spreadsheets with thousands of rows, presentations with dozens of slides), consider summarizing or limiting the context to the most relevant sections.

Available Tools

When Microsoft 365 tools are enabled in a thread, the AI can interact with your Microsoft ecosystem during a conversation. Tools allow dynamic operations that go beyond static file context.

Enabling Microsoft 365 Tools

  1. Open your thread
  2. Click the Tools configuration
  3. Locate the Microsoft 365 tools section
  4. Enable the specific tools you want the AI to have access to

Email (Outlook)

MS365 Email Tool

Reading Emails

  • Search your inbox by sender, subject, date range, or content keywords
  • Read full email threads with all replies
  • Access email metadata (timestamps, recipients, CC/BCC)
  • View attachment names and types

Sending Emails

  • Compose and send new emails
  • Reply to existing email threads
  • Set recipients (To, CC, BCC)
  • Format email body with appropriate structure

Important: When the AI drafts an email, the tool call and email content are displayed in the thread before sending. In Console Mode, you must explicitly approve the send action. In Chat Mode, the AI will ask for confirmation before sending.

Calendar

Viewing Events

  • List upcoming events for a date range
  • Check availability and free/busy times
  • View event details including attendees, location, and agenda
  • Access recurring event patterns

Creating Events

  • Schedule new meetings with title, time, and description
  • Add attendees by email address
  • Set reminders and recurrence patterns
  • Specify physical or virtual meeting location

SharePoint and OneDrive

File Search

  • Search across all SharePoint sites and OneDrive by filename
  • Search by file content (full-text search when indexed by SharePoint)
  • Filter by file type, modification date, or site

File Operations

  • Read file contents directly during a conversation
  • List folder contents to browse document libraries
  • Access file metadata (author, last modified, version)

Teams

Channel Messages

  • Access Teams channels within your organization
  • Read conversation threads in channels
  • Search message history by keyword or date range
  • View message reactions and replies

Use Cases

Document Analysis

Add SharePoint files as context blocks and ask the AI to:

  • Summarize a lengthy report or specification document
  • Compare two versions of a contract or proposal
  • Extract key data points from a spreadsheet
  • Identify inconsistencies across multiple documents

Email Drafting and Management

Enable email tools and ask the AI to:

  • Draft a professional response to a client email, referencing attached documents for accuracy
  • Summarize a long email thread into key discussion points and action items
  • Search for emails from a specific sender about a particular topic
  • Compose a meeting follow-up email that references calendar event details

Meeting Preparation

Combine calendar and file tools to:

  • List today's meetings and retrieve related documents from SharePoint
  • Create a meeting brief with agenda items from email threads
  • Prepare talking points based on documents shared in a Teams channel
  • Draft meeting notes templates with attendee information from the calendar event

Cross-System Research

Use multiple Microsoft 365 capabilities together:

  • Search emails for a project topic, find related SharePoint documents, and create a summary
  • Check calendar availability and draft a meeting invite with relevant files attached
  • Review Teams channel discussions and compile key decisions into a report
  • Search OneDrive for recent files and cross-reference with email conversations

Configuration

Per-Thread Tool Selection

Each thread can have a different set of Microsoft 365 tools enabled. This allows you to:

  • Enable only email tools for communication-focused threads
  • Enable only SharePoint tools for document analysis threads
  • Enable all tools for comprehensive research threads

Limiting the enabled tools reduces token consumption and helps the AI focus on the relevant capabilities.

Organization-Level Controls

Organization administrators can configure:

  • Available capabilities -- Enable or disable specific tool categories (email, calendar, files, Teams) for the entire organization
  • Usage policies -- Set guidelines for email sending and other write operations
  • Domain restrictions -- Limit which SharePoint sites or email domains are accessible

Best Practices

  1. Be specific with file searches. Include the SharePoint site name or folder path when asking the AI to find files. "Find the Q4 report in the Marketing SharePoint" is more effective than "Find the Q4 report."
  2. Use folder navigation. When you know the approximate location of a file, ask the AI to list folder contents and navigate to it rather than relying on search alone.
  3. Review before sending. Always review AI-composed emails before approving the send action. Verify recipients, tone, and factual accuracy.
  4. Combine with context blocks. For document analysis, add the file as a context block rather than using the file read tool. Context blocks persist throughout the conversation, while tool reads are one-time fetches.
  5. Manage calendar carefully. When asking the AI to create calendar events, provide explicit details (exact time, duration, attendees) to avoid miscommunication.
  6. Check permissions first. If the AI reports access denied errors, verify that your Microsoft 365 account has the necessary permissions for the resource you are trying to access.

Troubleshooting

Connection Issues

"Connection expired" error Your Microsoft 365 OAuth token has expired. Go to Profile > Integrations and click Reconnect on your Microsoft 365 connection.

"Admin consent required" during connection Your Azure AD tenant requires administrator approval for the application. Contact your IT administrator to grant admin consent for the GPT Workbench application in Azure AD.

Cannot access certain SharePoint sites SharePoint permissions are inherited from your Microsoft 365 account. If you cannot access a site through GPT Workbench, you also cannot access it through SharePoint directly. Request access from the site owner.

Tool Issues

Email search returns no results Microsoft Graph search indexes emails asynchronously. Very recent emails (less than a few minutes old) may not appear in search results. Try again after a short wait, or search by sender email address for more reliable results.

Calendar events not showing Verify that the calendar you are querying is your primary calendar. Shared calendars and group calendars may require additional permissions.

GPT Workbench Documentation