Supyagent
Cloud IntegrationsProviders

Microsoft 365

Connect Outlook Mail, Calendar, and OneDrive to your agents via Supyagent Cloud.

Microsoft 365 Integration

Microsoft 365 provides access to three services: Outlook Mail, Outlook Calendar, and OneDrive. Your agents can read and send emails, manage calendar events, and access files in your OneDrive.

OAuth Setup

When you click Connect Microsoft on the dashboard, Supyagent requests the following scopes:

ScopeServiceAccess
Mail.ReadOutlook MailRead your emails
Mail.SendOutlook MailSend emails on your behalf
Calendars.ReadWriteCalendarView and manage calendar events
Files.ReadWriteOneDriveAccess and manage your files
openidProfileOpenID Connect authentication
profileProfileRead your basic profile
emailProfileRead your email address
offline_accessAuthRefresh tokens when they expire

Permissions

Permission IDNameTypeDescription
microsoft.mail.readRead emailsreadView and search your emails
microsoft.mail.sendSend emailswriteSend emails on your behalf
microsoft.calendar.readRead calendarreadView your calendar events
microsoft.calendar.writeManage calendarwriteCreate, update, and delete events
microsoft.files.readRead filesreadView and download your files
microsoft.files.writeManage fileswriteUpload, create, and organize files

Outlook Mail

Example Actions

List recent emails:

curl -X GET "https://app.supyagent.com/api/v1/microsoft/mail/messages?limit=10" \
  -H "Authorization: Bearer sk_live_..."

Search emails:

curl -X GET "https://app.supyagent.com/api/v1/microsoft/mail/messages?search=quarterly+report" \
  -H "Authorization: Bearer sk_live_..."

Send an email:

curl -X POST "https://app.supyagent.com/api/v1/microsoft/mail/send" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "to": "alice@company.com",
    "subject": "Q4 Report Draft",
    "body": "Hi Alice,\n\nPlease find the draft attached.\n\nBest regards"
  }'

What Agents Can Do

  • Search and list emails by sender, subject, date, or full-text search
  • Read email bodies and metadata
  • Send new emails
  • Reply to existing email threads

Outlook Calendar

Example Actions

List upcoming events:

curl -X GET "https://app.supyagent.com/api/v1/microsoft/calendar/events?days=7" \
  -H "Authorization: Bearer sk_live_..."

Create an event:

curl -X POST "https://app.supyagent.com/api/v1/microsoft/calendar/events" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Sprint Planning",
    "start": "2025-03-20T14:00:00",
    "end": "2025-03-20T15:00:00",
    "attendees": ["bob@company.com", "carol@company.com"]
  }'

What Agents Can Do

  • List events for any date range
  • Create, update, and cancel events
  • Add attendees and locations
  • Check free/busy availability

OneDrive

Example Actions

List files in root:

curl -X GET "https://app.supyagent.com/api/v1/microsoft/drive/files" \
  -H "Authorization: Bearer sk_live_..."

Search files:

curl -X GET "https://app.supyagent.com/api/v1/microsoft/drive/files?search=budget+2025" \
  -H "Authorization: Bearer sk_live_..."

What Agents Can Do

  • Browse files and folders
  • Search files by name or content
  • Download file contents
  • Upload new files
  • Create and organize folders

Notes

  • Microsoft tokens expire after 1 hour but are automatically refreshed using the offline_access scope
  • The Microsoft Graph API powers all three services under a unified authentication
  • Outlook search uses the Microsoft Search API, which supports natural language queries
  • OneDrive access includes both personal OneDrive and SharePoint document libraries