Functional Risk Assessment: OutlookCalendar Integration#
@RISK:OutlookCalendar
Requirement Reference#
- URS Reference: @URS:OutlookCalendar
- Feature File:
requirements/features/outlook-calendar.feature - System Component: Outlook Calendar MCP Server (
connectors/mcps/outlook-calendar/)
Executive Summary#
The OutlookCalendar integration enables AI assistants to retrieve calendar events from Microsoft 365 calendars via Microsoft Graph API. This assessment identifies 6 primary risks spanning security (unauthorized access, token compromise), privacy (meeting details, attendee PII), and availability (service dependencies).
Risk Classification: HIGH
Key Concerns: Calendar events contain sensitive meeting details, attendee information, and location data. OAuth2 token compromise or implementation errors could expose scheduling patterns and confidential business activities. Read-only access reduces impact compared to write-enabled systems.
Risk Inventory#
R1: Unauthorized Calendar Access via Token Compromise#
@RISK_ID:OutlookCalendar-R1
Description:
An attacker obtains a valid OAuth2 access token (through phishing, malware, or token theft) and uses it to read calendar events, meeting details, and attendee information that the legitimate user can access.
Cause: - OAuth2 bearer tokens grant access to anyone presenting them - Tokens transmitted over HTTPS but could be logged, cached, or stolen from client memory - Token lifetime creates a window of opportunity (default: 1 hour)
Impact:
HIGH — Exposure of sensitive meeting details (subject lines like "Performance Review", "Confidential Project X"), attendee lists (PII: names, email addresses), location data, online meeting URLs, and scheduling patterns revealing business activities
Likelihood:
MEDIUM — OAuth2 tokens are targeted by attackers. Mobile/desktop clients increase exposure surface.
Risk Level: HIGH (Impact: HIGH × Likelihood: MEDIUM)
Mitigations:
1. OAuth2 On-Behalf-Of (OBO) Flow (connectors/mcps/outlook-calendar/auth.py)
- User identity preserved through token chain
- No shared service account credentials
- Each assistant session authenticated as the actual user
- Scoped Permissions (
task-definition.json- GRAPH_SCOPES) - Limited to
Calendars.Readonly (no create, update, delete, or send capabilities) -
Reduces blast radius if token compromised
-
Token Expiration (Microsoft Entra ID default: 60 minutes)
- Limits window of unauthorized access
-
Requires re-authentication after expiry
-
TLS Encryption (Microsoft Graph API enforces HTTPS)
- Tokens encrypted in transit
-
Protection against network interception
-
Azure AD Conditional Access (Microsoft Entra ID policies)
- MFA enforcement at authentication time
- Device compliance checks
- IP-based access restrictions
- Risk-based conditional access (Azure AD Identity Protection)
Verification:
- TEST-OutlookCalendar-R1-T1: Verify expired tokens rejected by Microsoft Graph API
- TEST-OutlookCalendar-R1-T2: Confirm token scopes limited to Calendars.Read (no write operations succeed)
- TEST-OutlookCalendar-R1-T3: Test cross-user access denied (User A token cannot access User B calendar)
- TEST-OutlookCalendar-R1-T4: Verify shared calendar access respects Microsoft 365 permissions (only accessible if user has permission)
Residual Risk: MEDIUM — Token theft remains possible through endpoint compromise. No additional technical controls within this component (relies on Azure AD conditional access policies, device compliance).
R2: Calendar Data Exposure Through Logging#
@RISK_ID:OutlookCalendar-R2
Description:
Calendar event subject lines, attendee names/emails, location details, or meeting body content logged to CloudWatch Logs, creating a GDPR violation and confidential information leak.
Cause:
- Python logging framework in use (connectors/mcps/outlook-calendar/calendar.py, server.py)
- Debug-level logging may inadvertently capture sensitive data
- CloudWatch logs retained for extended periods (configurable)
- Calendar events contain high-density PII (names, emails, locations, meeting notes)
Impact:
HIGH — GDPR Article 5 violation (data minimization, purpose limitation). Confidential meeting details exposed to anyone with CloudWatch access. Regulatory penalties, reputational damage.
Likelihood:
MEDIUM — Common misconfiguration during development. Default Python logging includes function arguments.
Risk Level: HIGH (Impact: HIGH × Likelihood: MEDIUM)
Mitigations: 1. Structured Logging with Field Exclusion - Configure Python logging to exclude event subject, attendees, location, body fields - Log only metadata: event IDs, counts, date ranges, error codes
- Log Level Configuration (ECS task:
LOG_LEVEL=INFO) - Disable DEBUG logging in production
-
Review existing log statements in
calendar.pyfor content leakage -
CloudWatch Log Encryption (AWS KMS)
- Encrypt logs at rest with customer-managed key
-
Rotate encryption keys annually
-
Log Retention Policy (AWS CloudWatch retention: 7 days)
- Minimize retention window for operational logs
-
No long-term storage of request/response logs
-
Code Review Checklist
- Review all
logger.debug(),logger.info()calls before production deployment - Automated linting rule: flag logging of variables named
subject,attendees,location,body
Verification:
- TEST-OutlookCalendar-R2-T1: Review CloudWatch logs after test calendar retrieval → expect no subject lines, attendee names, or locations
- TEST-OutlookCalendar-R2-T2: Verify CloudWatch log group encryption enabled
- TEST-OutlookCalendar-R2-T3: Test error handling → confirm exceptions do not include event content
Residual Risk: LOW — With proper configuration and code review, logging leakage is preventable. Requires ongoing vigilance during development.
R3: Cross-User Calendar Access via Authorization Bypass#
@RISK_ID:OutlookCalendar-R3
Description:
Implementation error in user-scoped calendar queries allows User A to retrieve calendar events belonging to User B, violating confidentiality and privacy.
Cause:
- Incorrect Microsoft Graph API query construction (e.g., using users/{user-id}/calendar with hardcoded or manipulated user ID)
- Missing user context validation in request routing
- Token misuse (service account token used instead of user-delegated token)
Impact:
CRITICAL — Unauthorized access to any user's calendar. Breach of trust, GDPR violation (unauthorized processing of personal data), potential for blackmail or competitive intelligence gathering.
Likelihood:
LOW — OAuth2 OBO flow inherently scopes access to the authenticated user. Would require deliberate implementation error.
Risk Level: MEDIUM (Impact: CRITICAL × Likelihood: LOW)
Mitigations:
1. Microsoft Graph API /me Endpoint (calendar.py)
- Use /me/calendar endpoint instead of /users/{user-id}/calendar
- Microsoft Graph API enforces token-based user context (no user ID manipulation possible)
- No Parameterized User IDs
- Never accept user ID from client requests
-
User identity derived solely from OAuth2 token claims
-
OAuth2 On-Behalf-Of (OBO) Flow
- Token inherently scoped to authenticated user
-
Microsoft Entra ID validates token-to-user binding
-
Integration Test Coverage
- Multi-user test scenarios: User A requests calendar, verify User B events not returned
Verification:
- TEST-OutlookCalendar-R3-T1: User A authenticates, attempts to specify User B's calendar → expect access denied
- TEST-OutlookCalendar-R3-T2: Review code for /users/{user-id} patterns → expect only /me usage
- TEST-OutlookCalendar-R3-T3: Token from User A used in API call → verify only User A's events returned
Residual Risk: LOW — OAuth2 OBO flow and Microsoft Graph API architecture make cross-user access technically difficult. Requires code review discipline.
R4: Meeting Attendee Privacy Violation#
@RISK_ID:OutlookCalendar-R4
Description:
Calendar event queries expose personal data of meeting attendees (names, email addresses) beyond the authenticated user's legitimate need, creating a GDPR data minimization violation.
Cause: - Microsoft Graph API returns full attendee list by default when retrieving event details - No filtering or redaction of attendee information in MCP server response - Attendee data includes both internal and external contacts (potential exposure of external business relationships)
Impact:
MEDIUM — GDPR Article 5(1)(c) violation (data minimization). Exposure of names and email addresses of individuals who did not consent to AI assistant access. Lower impact than full event content exposure (names/emails less sensitive than meeting content), but still creates compliance risk.
Likelihood:
HIGH — By design, calendar events include attendee lists. No technical control prevents this unless explicitly filtered.
Risk Level: MEDIUM (Impact: MEDIUM × Likelihood: HIGH)
Mitigations: 1. User Consent and Transparency (OAuth2 consent screen) - Azure AD OAuth2 consent flow explicitly states "Read your calendars" scope - User aware that calendar access includes attendee information
- Purpose Limitation (System design)
- MCP server is read-only proxy with no persistence
- Attendee data not stored, cached, or logged
-
Transient access only during active user session
-
Shared Calendar Permission Inheritance
- Microsoft Graph API enforces Microsoft 365 sharing permissions
-
If user has access to shared calendar, attendee visibility follows Microsoft 365 policy
-
No Third-Party Disclosure
- Attendee data remains within Microsoft 365 and Azure AD security boundaries
- No export, backup, or replication to non-Microsoft systems
Verification:
- TEST-OutlookCalendar-R4-T1: Review OAuth2 consent screen → confirm "Read your calendars" scope disclosed
- TEST-OutlookCalendar-R4-T2: Verify MCP server does not persist attendee data (no database writes, no cache)
- TEST-OutlookCalendar-R4-T3: Test shared calendar access → confirm attendee visibility matches Microsoft 365 permissions
Residual Risk: MEDIUM — Attendee data exposure is inherent to calendar functionality. Mitigated by user consent and purpose limitation, but not eliminated. Consider future enhancement: optional attendee redaction if user only needs scheduling availability (not full attendee lists).
R5: Service Dependency on Microsoft Graph API Availability#
@RISK_ID:OutlookCalendar-R5
Description:
Microsoft Graph API downtime, throttling, or regional outage prevents AI assistant from accessing calendar data, blocking time-sensitive queries (e.g., "What meetings do I have in the next hour?").
Cause: - External dependency on Microsoft 365 service availability - Microsoft Graph API rate limits (per-user, per-app throttling) - Regional Azure outages affecting Graph API endpoints - Network connectivity issues between AWS ECS and Microsoft Graph API
Impact:
MEDIUM — User functionality degraded. Calendar queries fail, reducing AI assistant utility. Does not create data loss or security risk (read-only operations). Business impact depends on user reliance on calendar feature.
Likelihood:
MEDIUM — Microsoft Graph API generally reliable (99.9% SLA), but throttling and transient errors occur. Rate limits can be reached with high-frequency queries.
Risk Level: MEDIUM (Impact: MEDIUM × Likelihood: MEDIUM)
Mitigations:
1. Exponential Backoff and Retry Logic (calendar.py)
- Implement retry mechanism for transient HTTP errors (429, 503, 504)
- Exponential backoff with jitter to avoid thundering herd
- Rate Limit Awareness (Microsoft Graph API documentation)
- Respect
Retry-Afterheader in 429 responses -
Avoid high-frequency polling (use event-driven approaches where possible)
-
User-Facing Error Messages
- Graceful degradation: return "Calendar temporarily unavailable" instead of raw API error
-
No stack traces or internal errors exposed to user
-
Monitoring and Alerting (CloudWatch metrics)
- Track Microsoft Graph API error rates (429, 5xx responses)
-
Alert on sustained elevated error rates
-
Microsoft 365 Status Monitoring
- Subscribe to Microsoft 365 Service Health API for proactive awareness of outages
Verification:
- TEST-OutlookCalendar-R5-T1: Simulate Microsoft Graph API 503 error → expect retry logic activated
- TEST-OutlookCalendar-R5-T2: Simulate Microsoft Graph API 429 throttling → expect backoff and Retry-After respected
- TEST-OutlookCalendar-R5-T3: Verify user-facing error message (no stack traces)
Residual Risk: MEDIUM — External dependency cannot be eliminated. Availability risk accepted as inherent to cloud service integration.
R6: Timezone and Recurrence Parsing Errors Causing Data Integrity Issues#
@RISK_ID:OutlookCalendar-R6
Description:
Incorrect parsing or handling of timezone-aware event times or recurring event patterns results in wrong event times displayed to users, leading to missed meetings or incorrect scheduling decisions.
Cause: - Microsoft Graph API returns times in ISO 8601 format with timezone information - Python datetime parsing errors (naive vs. aware datetime objects) - Recurring event expansion logic errors (missing or duplicated occurrences) - Daylight Saving Time (DST) transitions handled incorrectly
Impact:
MEDIUM — User sees wrong meeting times, potentially causing missed appointments. Does not create data loss (read-only system), but creates operational risk and user distrust.
Likelihood:
MEDIUM — Timezone and recurrence logic is complex. Common source of bugs in calendar integrations.
Risk Level: MEDIUM (Impact: MEDIUM × Likelihood: MEDIUM)
Mitigations:
1. Use Microsoft Graph API Timezone Fields (calendar.py)
- Preserve start.dateTime, start.timeZone, end.dateTime, end.timeZone from API response
- Do not attempt timezone conversion (pass through original values)
- ISO 8601 Parsing Library (
python-dateutilordatetime) - Use battle-tested parsing libraries instead of custom regex
-
Handle UTC, offset, and named timezone formats
-
Recurring Event Expansion by Microsoft Graph API
- Use
$expand=instancesquery parameter to let Microsoft Graph API expand recurrences -
Avoid client-side recurrence logic (complex and error-prone)
-
Integration Test Coverage
- Test events across DST boundaries
- Test recurring events (daily, weekly, monthly patterns)
- Test multi-timezone events (organizer in CET, attendee in EST)
Verification:
- TEST-OutlookCalendar-R6-T1: Create test event in CET timezone → verify times displayed correctly
- TEST-OutlookCalendar-R6-T2: Create recurring weekly event spanning DST transition → verify all occurrences correct
- TEST-OutlookCalendar-R6-T3: Create all-day event → verify isAllDay flag preserved (no incorrect time shown)
Residual Risk: LOW — Using Microsoft Graph API native timezone handling and recurrence expansion eliminates most complexity. Requires thorough testing.
Risk Summary#
| Risk ID | Description | Impact | Likelihood | Risk Level | Residual Risk |
|---|---|---|---|---|---|
| R1 | Unauthorized calendar access via token compromise | HIGH | MEDIUM | HIGH | MEDIUM |
| R2 | Calendar data exposure through logging | HIGH | MEDIUM | HIGH | LOW |
| R3 | Cross-user calendar access via authorization bypass | CRITICAL | LOW | MEDIUM | LOW |
| R4 | Meeting attendee privacy violation | MEDIUM | HIGH | MEDIUM | MEDIUM |
| R5 | Service dependency on Microsoft Graph API availability | MEDIUM | MEDIUM | MEDIUM | MEDIUM |
| R6 | Timezone and recurrence parsing errors | MEDIUM | MEDIUM | MEDIUM | LOW |
Testing Strategy#
Security Testing#
- Expired token rejection (R1)
- Cross-user access prevention (R1, R3)
- Token scope enforcement (R1)
- Shared calendar permission inheritance (R3, R4)
Privacy Testing#
- Log content inspection (R2)
- Attendee data non-persistence verification (R4)
- User consent flow validation (R4)
Reliability Testing#
- Microsoft Graph API error simulation (R5)
- Rate limiting handling (R5)
- Timezone and recurrence edge cases (R6)
Integration Testing#
- Multi-user scenarios (R3)
- Shared calendar access (R1, R3)
- Online meeting details retrieval (R4)
Compliance Mapping#
| Regulation | Requirement | Risk Coverage |
|---|---|---|
| GDPR Article 5(1)(a) | Lawfulness, fairness, transparency | R4 (user consent via OAuth2) |
| GDPR Article 5(1)(c) | Data minimization | R2, R4 (no logging, no persistence) |
| GDPR Article 5(1)(f) | Integrity and confidentiality | R1, R2, R3 (access controls, encryption) |
| GDPR Article 32 | Security of processing | R1, R2 (TLS, token expiration, log encryption) |
| 21 CFR Part 11.10 | Controls for closed systems (if applicable) | R1 (user authentication), R2 (audit trails) |
Risk Acceptance Statement#
The OutlookCalendar integration operates as a read-only proxy to Microsoft Graph API, significantly reducing risk compared to write-enabled calendar systems. All identified risks have mitigations in place. Residual risks (token compromise, attendee privacy) are accepted as inherent to OAuth2-based cloud API integrations and are balanced by:
- Microsoft Entra ID security controls (MFA, conditional access)
- Scoped permissions (Calendars.Read only)
- No data persistence (transient proxy)
- User consent and transparency (OAuth2 consent flow)
Risk Owner: Product Owner / Engineering Lead
Review Date: [To be completed after design review]
References#
- URS:
requirements/features/outlook-calendar.feature - OAuth Design:
docs/design-oauth-authentication.md - Related Risk Assessment:
docs/risks/risk-assessment-outlook-mail.md - Related Risk Assessment:
docs/risks/risk-assessment-oauth-authentication.md - Microsoft Graph API: https://learn.microsoft.com/en-us/graph/api/calendar-get
- GDPR Compliance: https://gdpr.eu/