Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Microsoft Graph Api

ASecurity

This skill should be used when the user asks to "read my emails", "send an email", "compose email", "check my calendar", "get calendar events", "create a meeting", "schedule an event", "add calendar event", "search emails", "list mail folders", "show unread messages", "what meetings do I have", "fetch emails from Microsoft", "access Outlook", or mentions Microsoft Graph, Office 365 email, or Outlook calendar integration.

416 stars
0 votes
0 copies
1 views
Added 2/8/2026
developmenttypescriptgobashazureapi

Works with

cliapi

Security Analysis

A100/100

Scanned 2/12/2026

Install to Claude Code

$npx -y skills add aiskillstore/marketplace --skill microsoft-graph-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Microsoft Graph Api?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Microsoft Graph Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-microsoft-graph-api/badge)](https://www.skillsdirectory.com/skills/aiskillstore-microsoft-graph-api)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: microsoft-graph-api
description: This skill should be used when the user asks to "read my emails", "send an email", "compose email", "check my calendar", "get calendar events", "create a meeting", "schedule an event", "add calendar event", "search emails", "list mail folders", "show unread messages", "what meetings do I have", "fetch emails from Microsoft", "access Outlook", or mentions Microsoft Graph, Office 365 email, or Outlook calendar integration.
version: 0.3.0
---

# Microsoft Graph API Integration

Access Microsoft 365 emails and calendar through TypeScript scripts executed via Bun.

## Overview

This skill provides access to Microsoft Graph API for:
- **Email**: List, read, search, and send emails
- **Calendar**: View, search, and create calendar events

All scripts return JSON and handle authentication automatically.

## Response Format

All scripts output JSON with a consistent structure:

### Success
```json
{"status": "success", "data": [...]}
```

### Authentication Required
```json
{
  "status": "auth_required",
  "userCode": "ABC123",
  "verificationUri": "https://microsoft.com/devicelogin",
  "expiresAt": "2024-01-15T10:30:00.000Z",
  "message": "To sign in, use a web browser..."
}
```

When you receive `auth_required`, display to the user:
```
To access your email, please authenticate:
1. Go to: https://microsoft.com/devicelogin
2. Enter code: ABC123

Let me know when you've completed authentication.
```

Then **retry the same command** - the script will automatically complete authentication.

### Authentication Pending
```json
{
  "status": "auth_pending",
  "userCode": "ABC123",
  "verificationUri": "https://microsoft.com/devicelogin",
  "expiresAt": "...",
  "message": "..."
}
```

User has been shown the code but hasn't completed login yet. Remind them to complete authentication.

### Error
```json
{"status": "error", "error": "Error description"}
```

## Email Access

All scripts are located at `${CLAUDE_PLUGIN_ROOT}/skills/microsoft-graph/scripts/`.

### List Emails

```bash
bun run ${CLAUDE_PLUGIN_ROOT}/skills/microsoft-graph/scripts/emails.ts list
bun run emails.ts list --folder "Sent Items" --top 5
bun run emails.ts list --profile work
```

### Read Specific Email

```bash
bun run emails.ts read --id AAMkAG...
```

Get the ID from the `list` command output.

### Search Emails

```bash
bun run emails.ts search --query "from:boss@company.com"
bun run emails.ts search --query "subject:quarterly report"
bun run emails.ts search --query "hasAttachments:true"
```

### List Mail Folders

```bash
bun run emails.ts folders
```

### Send Email

```bash
# Simple email
bun run emails.ts send --to "user@example.com" --subject "Hello" --body "Hi there!"

# Multiple recipients with CC
bun run emails.ts send --to "a@example.com,b@example.com" --cc "c@example.com" --subject "Team Update" --body "Here's the update..."

# HTML email
bun run emails.ts send --to "user@example.com" --subject "Report" --body "<h1>Monthly Report</h1><p>Details...</p>" --html

# With BCC
bun run emails.ts send --to "team@example.com" --bcc "manager@example.com" --subject "Announcement" --body "..."
```

## Calendar Access

### List Upcoming Events

```bash
bun run ${CLAUDE_PLUGIN_ROOT}/skills/microsoft-graph/scripts/calendar.ts list
bun run calendar.ts today
bun run calendar.ts week
bun run calendar.ts list --start tomorrow --end +7d
```

### View Specific Event

```bash
bun run calendar.ts view --id AAMkAG...
```

### Search Events

```bash
bun run calendar.ts search --query "team standup"
```

### Date Formats

- **Relative**: `today`, `tomorrow`, `+7d`, `+1m`, `+1y`
- **Absolute**: ISO format `2024-01-15` or `2024-01-15T14:00:00`

### Create Calendar Event

```bash
# Basic event (1 hour default duration)
bun run calendar.ts create --subject "Team Meeting" --start "2024-01-15T14:00:00"

# Event with end time
bun run calendar.ts create --subject "Workshop" --start "2024-01-15T09:00:00" --end "2024-01-15T12:00:00"

# Event with location and description
bun run calendar.ts create --subject "Lunch" --start "2024-01-15T12:00:00" --location "Cafe" --body "Team lunch"

# Event with attendees
bun run calendar.ts create --subject "1:1" --start tomorrow --end +1d --attendees "colleague@example.com"

# Multiple attendees
bun run calendar.ts create --subject "Review" --start "2024-01-15T10:00:00" --attendees "a@ex.com,b@ex.com,c@ex.com"

# All-day event
bun run calendar.ts create --subject "Holiday" --start "2024-12-25" --all-day

# Using relative dates
bun run calendar.ts create --subject "Follow-up" --start tomorrow --end +1d
```

## Multi-Profile Support

Store multiple accounts using profiles:

```bash
# Use work profile
bun run emails.ts list --profile work
bun run calendar.ts today --profile work

# Use personal profile
bun run emails.ts list --profile personal
```

## Manual Authentication

For explicit auth management (listing/deleting profiles):

```bash
# List all profiles
bun run ${CLAUDE_PLUGIN_ROOT}/skills/microsoft-graph/scripts/auth.ts --list

# Delete a profile
bun run auth.ts --delete --profile old-account

# Authenticate with custom Azure AD app
bun run auth.ts --client-id your-app-id --tenant-id your-tenant-id
```

## Token Lifecycle

| Token Type | Lifetime | Handling |
|------------|----------|----------|
| Access Token | ~1 hour | Automatically refreshed |
| Refresh Token | ~90 days | When expired, scripts return `auth_required` |

Users only need to re-authenticate when the refresh token expires (~90 days).

## Credential Storage

Credentials are stored at `~/.config/api-skills/credentials.json`.

## Script Reference

| Script | Purpose |
|--------|---------|
| `emails.ts` | Email list, read, search, send, and folder operations |
| `calendar.ts` | Calendar view, search, and create operations |
| `auth.ts` | Manual credential management (list, delete profiles) |

## Additional Resources

For detailed API reference, see:
- **`references/graph-api.md`** - Microsoft Graph API endpoints and parameters

Attribution

aiskillstoreaiskillstore
View sourceMore from aiskillstore →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284722 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2192 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →