[BUG] Microsoft 365 MCP connector: outlook_email_search rejects hyphenated domains in mailboxOwnerEmail

Resolved 💬 2 comments Opened Apr 23, 2026 by justinkingston Closed Apr 26, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The mailboxOwnerEmail parameter on the outlook_email_search tool rejects
RFC-compliant email addresses that contain a hyphen in the domain label.
Validation fails at input parsing, before the request reaches Microsoft Graph.

The same address format is accepted by the recipient parameter on the
same tool, suggesting an over-strict format: email validator (likely Zod
default) applied only to mailboxOwnerEmail and calendarOwnerEmail.

What Should Happen?

The mailboxOwnerEmail parameter should accept any RFC-compliant email
address, including those with hyphens in the domain label. Hyphens are
explicitly valid per RFC 5321 §4.1.2 and RFC 1035 §2.3.1 — domain labels
may contain hyphens as long as they are not leading or trailing.

The validator should pass the request through to Microsoft Graph, where
actual permission and mailbox-existence checks belong. Any of these
addresses should validate successfully:

  • user1@domain-name.com
  • user2@d-n.com

For consistency, this should match the looser validation already applied
to recipient, sender, and organizer on the same tool, which accept these
addresses without issue.

Error Messages/Logs

MCP error -32602: Input validation error: Invalid arguments for tool 
outlook_email_search: [
  {
    "validation": "email",
    "code": "invalid_string",
    "message": "Invalid email",
    "path": ["mailboxOwnerEmail"]
  }
]

request_id: req_011CaKTf8kFygsmUCiDeMgqK

Second attempt (same error, different request ID):
request_id: req_011CaKTfdVPZyGYWcooorK2b

Steps to Reproduce

  1. In claude.ai with the Microsoft 365 connector enabled, ask Claude to

search a shared mailbox on a hyphenated domain. Example prompt:

"Search the shared mailbox [email protected] for emails
received this week"

  1. Claude invokes outlook_email_search with:
  • mailboxOwnerEmail: "[email protected]"
  • afterDateTime: "Monday April 20 2026"
  • limit: 50
  1. Observe immediate rejection at input validation with the error above.

The request never reaches Microsoft Graph.

  1. For comparison, invoke the same tool with:
  • recipient: "[email protected]"

This call passes validation and executes against Graph successfully,
confirming the address format itself is valid and the bug is
specifically in the mailboxOwnerEmail validator.

Expected behavior: search proceeds; Graph returns either results or
a permissions/not-found error.

Actual behavior: rejected at input validation before reaching Graph.

Claude Model

Other

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

n/a

Platform

Other

Operating System

Other

Terminal/Shell

Other

Additional Information

This bug is filed in anthropics/claude-code because there is no dedicated public issue tracker for claude.ai built-in MCP connectors. Recent precedent: #51790 (Gmail connector), #44361 (Slack connector) filed in the same repo.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗