Summary
In packages/provider-microsoft/src/email-graph-provider.ts, createDraft(msg) builds the Graph payload with only subject, body, and toRecipients. It never reads msg.cc or msg.bcc. Any non-reply draft created via the Microsoft provider silently loses those recipients, independent of how the caller formatted the address strings.
Reproduction
await create_draft({
mailbox: "<graph mailbox>",
to: ["alice@example.com"],
cc: ["bob@example.com"],
subject: "Hello",
body: "...",
});
Open the resulting draft in the Graph mailbox — cc is missing. No error is surfaced.
Root cause
async createDraft(msg: ComposeMessage): Promise<DraftResult> {
const graphMsg = {
subject: msg.subject,
body: buildGraphBody(msg.bodyHtml, msg.body),
toRecipients: msg.to.map(r => ({ emailAddress: { address: r.email, name: r.name } })),
};
const response = await this.client.post(`${this.basePath}/messages`, graphMsg);
return { success: true, draftId: response.id };
}
No ccRecipients or bccRecipients mapping. Contrast with sendMessage in the same file, which does include both.
Expected behavior
createDraft should include ccRecipients and bccRecipients in the payload whenever msg.cc / msg.bcc are present, matching the mapping used in sendMessage.
Scope
Affects create_draft when called against a Microsoft Graph mailbox. The reply-draft path (createReplyDraft) correctly includes ccRecipients via its post-creation PATCH, so it is not affected.
Related
#47 is a broader round-trip contract bug in the action layer that also affects recipient handling. It is orthogonal — even after #47 ships, this Graph-specific drop remains until createDraft is updated to include ccRecipients / bccRecipients.
Summary
In
packages/provider-microsoft/src/email-graph-provider.ts,createDraft(msg)builds the Graph payload with onlysubject,body, andtoRecipients. It never readsmsg.ccormsg.bcc. Any non-reply draft created via the Microsoft provider silently loses those recipients, independent of how the caller formatted the address strings.Reproduction
Open the resulting draft in the Graph mailbox —
ccis missing. No error is surfaced.Root cause
No
ccRecipientsorbccRecipientsmapping. Contrast withsendMessagein the same file, which does include both.Expected behavior
createDraftshould includeccRecipientsandbccRecipientsin the payload whenevermsg.cc/msg.bccare present, matching the mapping used insendMessage.Scope
Affects
create_draftwhen called against a Microsoft Graph mailbox. The reply-draft path (createReplyDraft) correctly includesccRecipientsvia its post-creation PATCH, so it is not affected.Related
#47 is a broader round-trip contract bug in the action layer that also affects recipient handling. It is orthogonal — even after #47 ships, this Graph-specific drop remains until
createDraftis updated to includeccRecipients/bccRecipients.