Graph filters both of these server-side, so neither is emulated here — receivedDateTime
comparisons and isRead are ordinary $filter clauses.
ProtectedProviderReturns the name of this provider for use in error messages. Override in subclasses to provide a more descriptive name.
Convenience gate: true when this provider supports inbound push in ANY form
(subscription-managed or inbound-parse), false otherwise. Lets callers cleanly
short-circuit — if (provider.SupportsPush) { ... } — instead of probing individual
operations.
Derived from GetSubscriptionCapabilities so it stays in lockstep with actual
capability: providers that support push return capabilities and thereby report
SupportsPush === true for free; providers that don't return undefined and report
false. Subclasses normally do NOT override this — override
GetSubscriptionCapabilities instead.
Archives a message by moving it to the Archive folder using MS Graph.
Optionalcredentials: MSGraphCredentialsCreates a draft email message via MS Graph.
Optionalcredentials: MSGraphCredentialsCreates a Microsoft Graph change-notification subscription for messages in a mailbox folder. Graph validates the notification endpoint synchronously during this call (it must echo the validation token), so an unreachable/incorrect endpoint surfaces here as a Graph error.
What to watch, where to notify, and the clientState secret
Optionalcredentials: MSGraphCredentialsOptional credentials override for this request
Promise
Deletes a message using MS Graph. If PermanentDelete is false, moves to Deleted Items folder.
Optionalcredentials: MSGraphCredentialsDeletes an existing Graph subscription. Idempotent from the consumer's perspective: a 404 (already gone) is treated as success. The caller MUST pass credentials for the same app registration that created the subscription.
The subscription ID to delete
Optionalcredentials: MSGraphCredentialsOptional credentials override for this request
Promise
Downloads an attachment from a message using MS Graph.
Optionalcredentials: MSGraphCredentialsForwards an email message via MS Graph.
Optionalcredentials: MSGraphCredentialsReads calendar events for one mailbox.
Optionalcredentials: MSGraphCredentialsMS Graph Scope: Calendars.Read (Application)
TWO ENDPOINTS, AND THE CHOICE IS VISIBLE TO THE CALLER. Graph exposes calendar data two ways and they do not return the same thing:
/calendarView REQUIRES a start and end and EXPANDS recurring series into one entry per
occurrence. A weekly stand-up in a two-week window comes back as two events, each with its
own start time and id./events needs no window and does NOT expand. That same stand-up is one row, the series
master, whose start time is whenever the series began - possibly years ago.A caller logging what actually happened wants occurrences; one asking "what meetings exist"
may want masters. Silently picking would be a trap, because the two are indistinguishable by
inspection - so the window decides, and RecurrenceExpanded on the result REPORTS which
happened rather than leaving the caller to infer it.
CANCELLED EVENTS ARE EXCLUDED BY DEFAULT and cannot be recovered afterwards - Graph does not
return them once filtered - so IncludeCancelled is honoured before the $top cap rather
than by discarding rows after the fetch, which would silently shrink the page.
ProtectedGetProtectedGets headers using default client.
ProtectedGetProtectedGets headers for a message using User object (requires prior user lookup). For better performance, consider using GetHeadersWithEmail() instead.
ProtectedGetProtectedGets headers for a specific message using email address directly. This is the preferred method for new code as it avoids an extra API call to look up the user.
Retrieves email messages from a mailbox via MS Graph.
Optionalcredentials: MSGraphCredentialsProtectedGetProtectedGetProtectedGets the user account information by making an API call to MS Graph. This method looks up the full User object from the Graph API.
Gets a single message by ID from MS Graph.
Optionalcredentials: MSGraphCredentialsReturns MS Graph's subscription capabilities. Graph mail subscriptions last at most 4230 minutes (~3 days), support all three change types, and require synchronous endpoint validation at create time.
Returns the list of operations supported by MS Graph provider. MS Graph supports all mailbox operations.
Lists attachments on a message using MS Graph.
Optionalcredentials: MSGraphCredentialsLists mail folders using MS Graph.
Optionalcredentials: MSGraphCredentialsMarks messages as read or unread using MS Graph.
Optionalcredentials: MSGraphCredentialsProtectedMarkProtectedMarkProtectedMarkMoves a message to a different folder using MS Graph.
Optionalcredentials: MSGraphCredentialsParses and validates an inbound Graph change notification. Pure: no Graph client,
no network. Safe on hostile/garbage input - never throws; returns Success: false
with a 400 suggested status on malformed payloads.
Graph has no cryptographic signature scheme, so SignatureValid is left undefined;
the consumer authenticates each notification by comparing its ClientState against
the secret stored alongside the subscription.
Transport-neutral capture of the inbound webhook request
Optional_credentials: MSGraphCredentialsPromise
Renews an existing Graph subscription before it expires. The caller MUST pass credentials for the same app registration that created the subscription - Graph subscriptions are visible only to their creator, so a credential mismatch surfaces as a 404.
The subscription ID and requested new expiration
Optionalcredentials: MSGraphCredentialsOptional credentials override for this request
Promise
Replies to an email message via MS Graph.
Optionalcredentials: MSGraphCredentialsSearches messages using MS Graph search or filter.
Optionalcredentials: MSGraphCredentialsSends a single email message via MS Graph.
Optionalcredentials: MSGraphCredentialsChecks if this provider supports a specific operation.
The operation to check
true if the operation is supported
Implementation of the MS Graph provider for sending and receiving messages.
Remarks
Microsoft Graph provides full mailbox access. This provider supports:
Example