This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This repo contains two versions of an Outlook add-in that attaches emails to work items:
TFSIntegration/β Legacy VSTO add-in (.NET 4.0, C#) targeting classic Outlook + TFS. No longer maintained.ADOIntegration/β Modern Office Add-in (TypeScript, React, Fluent UI) targeting new Outlook (Windows, web, Mac) + Azure DevOps. Active development.
cd ADOIntegration
# Install dependencies
npm install
# Development server (https://localhost:3000)
npm start
# Production build
npm run buildNo tests yet. Sideload for manual testing via the Outlook developer tools or npx office-addin-debugging start manifest.json.
Modern Office Add-in using TypeScript + React + Fluent UI + Office.js. Runs as a web app inside Outlook's webview.
Entry points:
manifest.jsonβ Unified manifest declaring ribbon button onmailReadcontextsrc/taskpane/index.tsxβ React mount point, wraps app in FluentProvidersrc/commands/commands.tsβ Ribbon command handler (opens task pane)
Core flow:
- User opens email β clicks "Attach to ADO" in ribbon β task pane opens
App.tsxβ Main component: auth gate β settings gate β work item UIcomponents/ConnectionSettings.tsxβ Configure Azure DevOps org URL, project, and auth method (Entra ID or PAT)components/WorkItemInput.tsxβ Enter work item ID, fetches title via REST APIcomponents/WorkItemList.tsxβ Shows added work items with remove optioncomponents/AttachButton.tsxβ Exports email as EML viagetAsFileAsync(), uploads to Azure DevOps (2-step: upload attachment β link to work item)
Services:
services/auth.tsβ MSAL.js Entra ID OAuth (popup flow)services/patAuth.tsβ PAT-based auth fallback (Basic auth header)services/azureDevOps.tsβ Azure DevOps REST API v7.1 (getWorkItem, attachFileToWorkItem, validateConnection)services/outlook.tsβ Office.js email export (getAsFileAsync with fallback EML construction)
Settings: Persisted via Office.context.roamingSettings (roams across devices).
Key deps: @fluentui/react-components, @azure/msal-browser, @azure/msal-react, office-js
msbuild TFSIntegration.sln /p:Configuration=DebugVSTO add-in, .NET 4.0, uses Microsoft.TeamFoundation.Client for TFS connectivity. See old code for reference only.