MailAttachmentUploadLarge
Summary
Creates an upload session for large attachments; your client uploads file chunks directly to the provided URL.
Graph Endpoint
POST /me/messages/{messageId}/attachments/createUploadSession
Parameters
Required
messageId: string— Alias:idOne of:
attachmentIds: number[]— Up to 10 repository attachment IDs; backend uploads the files completely.name: string— When requesting an upload session (legacy/external upload)
Recommended (when requesting an upload session)
size: number
Optional
contentType: string— Defaultapplication/octet-stream
Usage (app.businessFunction)
Using repository attachments (recommended)
Requesting an upload session (external upload)
Response
Notes
Backend handles upload sessions and chunked PUTs for
attachmentIds. Limit: max 10 attachments per call.If you request an upload session, upload file chunks to
uploadUrlusing HTTPPUTwith byte ranges as described in Microsoft Graph documentation.
See also
MailSend — send a new message with
attachmentIdsin one callMailReply — reply and attach repository files
MailReplyAll — reply-all with attachments
MailForward — forward with attachments
Last updated
Was this helpful?