> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Exchange Server (EWS)

> Resources, examples, configuration and evidence for Exchange Server (EWS).

Use the `@bijection/connectors/exchange-ews` entrypoint to declare Exchange Server (EWS) resources.

## Availability

This page describes the pinned source package. Published availability is unestablished for this artifact. [Source build and package availability](https://docs.bijection.com/client/sdk-distribution.md).

## Resources and modes

| Resource | Mode | Description |
| - | - | - |
| Mailbox | `incremental` | incremental |

Declare a resource in application code, then bind deployment-specific settings and credentials. See [typed resources](https://docs.bijection.com/integrations/resources.md), [connections](https://docs.bijection.com/integrations/connections.md) and [source inspection](https://docs.bijection.com/integrations/cli.md).

## Mailbox

### incremental: incremental

The following example matches configuration `standard`.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { exchangeEws } from "@bijection/connectors/exchange-ews";
export const mailbox = exchangeEws.mailbox.incremental();
```

> **Inferred record types**
>
> ```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> messages: {
>   "message_key": string;
>   "provider_id": string;
>   "thread_id": string | null | undefined;
>   "received_at": string | null | undefined;
>   "arrival_key": string | null | undefined;
> }
>
> contents: {
>   "message_key": string;
>   "provider_id": string;
>   "content_status": "complete" | "unavailable" | "pending" | undefined;
>   "content_failure": string | null | undefined;
>   "message_id": string | null | undefined;
>   "subject": string | null | undefined;
>   "sent_at": string | null | undefined;
>   "from": { name: string | null; address: string | null; }[] | undefined;
>   "to": { name: string | null; address: string | null; }[] | undefined;
>   "cc": { name: string | null; address: string | null; }[] | undefined;
>   "body_text": { file: Id<"_storage">; size: number; sha256: string; media_type: string; }[] | undefined;
>   "body_html": { file: Id<"_storage">; size: number; sha256: string; media_type: string; }[] | undefined;
>   "receiver_authentication": { status: "not_declared"; } | { status: "absent"; } | { status: "malformed"; authserv_id: string; } | { status: "reported"; authserv_id: string; spf: { result: string; properties: { name: string; value: string; }[]; reason: string | null; }[]; dkim: { result: string; properties: { name: string; value: string; }[]; reason: string | null; }[]; dmarc: { result: string; properties: { name: string; value: string; }[]; reason: string | null; }[]; arc: { result: string; properties: { name: string; value: string; }[]; reason: string | null; }[]; } | undefined;
>   "dkim_verification": { status: "verified"; verified_at: string; signatures: { result: "none" | "pass" | "fail" | "neutral" | "temperror" | "permerror"; domain: string | null; selector: string | null; failure: string | null; }[]; } | { status: "not_evaluated"; reason: "too_many_signatures" | "invalid_message"; } | undefined;
>   "protection": { protocol: "smime" | "openpgp"; reason: string | null; layer: "signed" | "encrypted"; covers: "message" | "part"; outcome: "verified" | "untrusted" | "unknown_signer" | "invalid" | "unsupported" | "malformed" | "not_decrypted"; signer: { subject: string | null; fingerprint: string; addresses: string[]; } | null; trust_anchors_sha256: string | null; verified_at: string; }[] | undefined;
>   "raw_mime": Id<"_storage"> | undefined;
>   "attachments": { name: string | null; file: Id<"_storage">; size: number; sha256: string; media_type: string; container: number | null; }[] | undefined;
>   "attachment_containers": { status: "complete" | "unavailable"; format: "tnef"; attachment: number; reason: string | null; omitted: number; }[] | undefined;
>   "invitations": { status: "complete" | "unavailable"; attachment: number; reason: string | null; calendar: { method: string | null; time_zones: string[]; events: { location: string | null; status: string | null; uid: string | null; recurrence_id: { kind: "date" | "date_time"; value: string; tzid: string | null; } | null; recurrence_range: string | null; sequence: number | null; stamp: { kind: "date" | "date_time"; value: string; tzid: string | null; } | null; summary: string | null; organizer: { name: string | null; address: string; } | null; attendees: { name: string | null; address: string; role: string | null; partstat: string | null; rsvp: boolean | null; }[]; start: { kind: "date" | "date_time"; value: string; tzid: string | null; } | null; end: { kind: "date" | "date_time"; value: string; tzid: string | null; } | null; duration: string | null; recurrence: { value: string; tzid: string | null; property: string; }[]; }[]; } | null; }[] | undefined;
>   "attachment_documents": { value?: any; refusal?: string | undefined; media_type: string; attachment: number; }[] | undefined;
> }
>
> memberships: {
>   "message_key": string;
>   "folder_key": string;
>   "flags": string[];
> }
> ```

#### Configuration: standard

Case: `exchange-ews/mailbox/incremental/standard`.

Connection and resource configuration are declared by this exact case.

Credential kind: `mailbox`. Keep credential material in the private credential inventory.

| Setting | Type | Required | Owner |
| - | - | - | - |
| `ews` | object | Yes | Shared connection |
| `folders` | array of string | Yes | Shared connection |

> **Complete configuration contract**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "setup": [],
>   "resource": {
>     "access": {},
>     "defaults": {},
>     "connector": "mailbox",
>     "output": {
>       "kind": "group",
>       "collections": [
>         "contents",
>         "memberships",
>         "messages"
>       ]
>     },
>     "credential_kind": "mailbox",
>     "connection_fields": [
>       "ews",
>       "folders"
>     ]
>   },
>   "connection_setup": {
>     "type": "object",
>     "value": {
>       "ews": {
>         "fieldType": {
>           "type": "object",
>           "value": {
>             "host": {
>               "fieldType": {
>                 "type": "string"
>               },
>               "optional": false
>             },
>             "port": {
>               "fieldType": {
>                 "type": "number"
>               },
>               "optional": false
>             },
>             "security": {
>               "fieldType": {
>                 "type": "union",
>                 "value": [
>                   {
>                     "type": "literal",
>                     "value": "implicit_tls"
>                   },
>                   {
>                     "type": "literal",
>                     "value": "start_tls"
>                   },
>                   {
>                     "type": "literal",
>                     "value": "loopback"
>                   }
>                 ]
>               },
>               "optional": false
>             }
>           }
>         },
>         "optional": false
>       },
>       "folders": {
>         "fieldType": {
>           "type": "array",
>           "value": {
>             "type": "string"
>           }
>         },
>         "optional": false
>       }
>     }
>   },
>   "execution": null
> }
> ```

Native admission analysis is available for this exact declaration.

**Collection: contents**

| Contract | Meaning |
| - | - |
| Initial | Enumeration of observed records |
| Changes | Repeated observations of current records |
| Deletions | Explicit deletion evidence |
| Resume | Opaque cursor |
| Gap | Explicit repair required after a gap |
| Retention | Unspecified |

> **Complete native profile**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "movement": {
>     "exchanges": {},
>     "nativeInputLimitBytes": "53398872",
>     "steps": [
>       {
>         "id": "acquire.1",
>         "inputs": [],
>         "action": {
>           "operation": "acquire",
>           "subject": "native input",
>           "limitBytes": "53398872"
>         }
>       },
>       {
>         "id": "retain.1",
>         "inputs": [
>           "acquire.1"
>         ],
>         "action": {
>           "operation": "retain",
>           "subject": "acquisition evidence",
>           "reason": "recovery",
>           "release": "acquisition_custody"
>         }
>       },
>       {
>         "id": "interpret.1",
>         "inputs": [
>           "retain.1"
>         ],
>         "action": {
>           "operation": "interpret",
>           "subject": "acquired input",
>           "produces": "records"
>         }
>       },
>       {
>         "id": "materialize.1",
>         "inputs": [
>           "interpret.1"
>         ],
>         "action": {
>           "operation": "materialize",
>           "subject": "source rows",
>           "reason": "serving",
>           "release": "replacement"
>         }
>       },
>       {
>         "id": "publish.1",
>         "inputs": [
>           "materialize.1"
>         ],
>         "action": {
>           "operation": "publish",
>           "subject": "source rows",
>           "visibility": "with_acquisition"
>         }
>       }
>     ]
>   },
>   "initial": "enumeration",
>   "changes": "observations",
>   "deletions": "explicit_events",
>   "resume": "opaque_cursor",
>   "retentionMs": null,
>   "gap": "explicit_repair",
>   "limits": {
>     "exchange_evidence_bytes": "4194304",
>     "publication_page_records": "128",
>     "record_fields": "32"
>   },
>   "restrictions": [
>     "Independent mailbox observations; content and membership gaps do not establish complete population"
>   ],
>   "commands": {}
> }
> ```

**Collection: memberships**

| Contract | Meaning |
| - | - |
| Initial | Current membership |
| Changes | Repeated observations of current records |
| Deletions | Explicit deletion evidence |
| Resume | Opaque cursor |
| Gap | Explicit repair required after a gap |
| Retention | Unspecified |

> **Complete native profile**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "movement": {
>     "exchanges": {},
>     "nativeInputLimitBytes": "53398872",
>     "steps": [
>       {
>         "id": "acquire.1",
>         "inputs": [],
>         "action": {
>           "operation": "acquire",
>           "subject": "native input",
>           "limitBytes": "53398872"
>         }
>       },
>       {
>         "id": "retain.1",
>         "inputs": [
>           "acquire.1"
>         ],
>         "action": {
>           "operation": "retain",
>           "subject": "acquisition evidence",
>           "reason": "recovery",
>           "release": "acquisition_custody"
>         }
>       },
>       {
>         "id": "interpret.1",
>         "inputs": [
>           "retain.1"
>         ],
>         "action": {
>           "operation": "interpret",
>           "subject": "acquired input",
>           "produces": "records"
>         }
>       },
>       {
>         "id": "materialize.1",
>         "inputs": [
>           "interpret.1"
>         ],
>         "action": {
>           "operation": "materialize",
>           "subject": "source rows",
>           "reason": "serving",
>           "release": "replacement"
>         }
>       },
>       {
>         "id": "publish.1",
>         "inputs": [
>           "materialize.1"
>         ],
>         "action": {
>           "operation": "publish",
>           "subject": "source rows",
>           "visibility": "with_acquisition"
>         }
>       }
>     ]
>   },
>   "initial": "current_membership",
>   "changes": "observations",
>   "deletions": "explicit_events",
>   "resume": "opaque_cursor",
>   "retentionMs": null,
>   "gap": "explicit_repair",
>   "limits": {
>     "exchange_evidence_bytes": "4194304",
>     "initial_rows": "128",
>     "publication_page_records": "128",
>     "record_fields": "32"
>   },
>   "restrictions": [
>     "Independent mailbox observations; content and membership gaps do not establish complete population"
>   ],
>   "commands": {}
> }
> ```

**Collection: messages**

| Contract | Meaning |
| - | - |
| Initial | Enumeration of observed records |
| Changes | Repeated observations of current records |
| Deletions | Explicit deletion evidence |
| Resume | Opaque cursor |
| Gap | Explicit repair required after a gap |
| Retention | Unspecified |

> **Complete native profile**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "movement": {
>     "exchanges": {},
>     "nativeInputLimitBytes": "53398872",
>     "steps": [
>       {
>         "id": "acquire.1",
>         "inputs": [],
>         "action": {
>           "operation": "acquire",
>           "subject": "native input",
>           "limitBytes": "53398872"
>         }
>       },
>       {
>         "id": "retain.1",
>         "inputs": [
>           "acquire.1"
>         ],
>         "action": {
>           "operation": "retain",
>           "subject": "acquisition evidence",
>           "reason": "recovery",
>           "release": "acquisition_custody"
>         }
>       },
>       {
>         "id": "interpret.1",
>         "inputs": [
>           "retain.1"
>         ],
>         "action": {
>           "operation": "interpret",
>           "subject": "acquired input",
>           "produces": "records"
>         }
>       },
>       {
>         "id": "materialize.1",
>         "inputs": [
>           "interpret.1"
>         ],
>         "action": {
>           "operation": "materialize",
>           "subject": "source rows",
>           "reason": "serving",
>           "release": "replacement"
>         }
>       },
>       {
>         "id": "publish.1",
>         "inputs": [
>           "materialize.1"
>         ],
>         "action": {
>           "operation": "publish",
>           "subject": "source rows",
>           "visibility": "with_acquisition"
>         }
>       }
>     ]
>   },
>   "initial": "enumeration",
>   "changes": "observations",
>   "deletions": "explicit_events",
>   "resume": "opaque_cursor",
>   "retentionMs": null,
>   "gap": "explicit_repair",
>   "limits": {
>     "exchange_evidence_bytes": "4194304",
>     "publication_page_records": "128",
>     "record_fields": "32"
>   },
>   "restrictions": [
>     "Independent mailbox observations; content and membership gaps do not establish complete population"
>   ],
>   "commands": {}
> }
> ```

> **Commands, occurrences and artifacts**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "records": {
>     "contents": {
>       "protocol": "record_observation",
>       "coverage": "records",
>       "consistency": "observations",
>       "atomicity": "record",
>       "history": "observations",
>       "recordRefresh": false,
>       "reconciliation": false,
>       "notifications": false,
>       "snapshotMaxRows": null,
>       "profile": {
>         "movement": {
>           "exchanges": {},
>           "nativeInputLimitBytes": "53398872",
>           "steps": [
>             {
>               "id": "acquire.1",
>               "inputs": [],
>               "action": {
>                 "operation": "acquire",
>                 "subject": "native input",
>                 "limitBytes": "53398872"
>               }
>             },
>             {
>               "id": "retain.1",
>               "inputs": [
>                 "acquire.1"
>               ],
>               "action": {
>                 "operation": "retain",
>                 "subject": "acquisition evidence",
>                 "reason": "recovery",
>                 "release": "acquisition_custody"
>               }
>             },
>             {
>               "id": "interpret.1",
>               "inputs": [
>                 "retain.1"
>               ],
>               "action": {
>                 "operation": "interpret",
>                 "subject": "acquired input",
>                 "produces": "records"
>               }
>             },
>             {
>               "id": "materialize.1",
>               "inputs": [
>                 "interpret.1"
>               ],
>               "action": {
>                 "operation": "materialize",
>                 "subject": "source rows",
>                 "reason": "serving",
>                 "release": "replacement"
>               }
>             },
>             {
>               "id": "publish.1",
>               "inputs": [
>                 "materialize.1"
>               ],
>               "action": {
>                 "operation": "publish",
>                 "subject": "source rows",
>                 "visibility": "with_acquisition"
>               }
>             }
>           ]
>         },
>         "initial": "enumeration",
>         "changes": "observations",
>         "deletions": "explicit_events",
>         "resume": "opaque_cursor",
>         "retentionMs": null,
>         "gap": "explicit_repair",
>         "limits": {
>           "exchange_evidence_bytes": "4194304",
>           "publication_page_records": "128",
>           "record_fields": "32"
>         },
>         "restrictions": [
>           "Independent mailbox observations; content and membership gaps do not establish complete population"
>         ],
>         "commands": {}
>       }
>     },
>     "memberships": {
>       "protocol": "record_observation",
>       "coverage": "incremental_snapshot",
>       "consistency": "observations",
>       "atomicity": "record",
>       "history": "observations",
>       "recordRefresh": false,
>       "reconciliation": false,
>       "notifications": false,
>       "snapshotMaxRows": "128",
>       "profile": {
>         "movement": {
>           "exchanges": {},
>           "nativeInputLimitBytes": "53398872",
>           "steps": [
>             {
>               "id": "acquire.1",
>               "inputs": [],
>               "action": {
>                 "operation": "acquire",
>                 "subject": "native input",
>                 "limitBytes": "53398872"
>               }
>             },
>             {
>               "id": "retain.1",
>               "inputs": [
>                 "acquire.1"
>               ],
>               "action": {
>                 "operation": "retain",
>                 "subject": "acquisition evidence",
>                 "reason": "recovery",
>                 "release": "acquisition_custody"
>               }
>             },
>             {
>               "id": "interpret.1",
>               "inputs": [
>                 "retain.1"
>               ],
>               "action": {
>                 "operation": "interpret",
>                 "subject": "acquired input",
>                 "produces": "records"
>               }
>             },
>             {
>               "id": "materialize.1",
>               "inputs": [
>                 "interpret.1"
>               ],
>               "action": {
>                 "operation": "materialize",
>                 "subject": "source rows",
>                 "reason": "serving",
>                 "release": "replacement"
>               }
>             },
>             {
>               "id": "publish.1",
>               "inputs": [
>                 "materialize.1"
>               ],
>               "action": {
>                 "operation": "publish",
>                 "subject": "source rows",
>                 "visibility": "with_acquisition"
>               }
>             }
>           ]
>         },
>         "initial": "current_membership",
>         "changes": "observations",
>         "deletions": "explicit_events",
>         "resume": "opaque_cursor",
>         "retentionMs": null,
>         "gap": "explicit_repair",
>         "limits": {
>           "exchange_evidence_bytes": "4194304",
>           "initial_rows": "128",
>           "publication_page_records": "128",
>           "record_fields": "32"
>         },
>         "restrictions": [
>           "Independent mailbox observations; content and membership gaps do not establish complete population"
>         ],
>         "commands": {}
>       }
>     },
>     "messages": {
>       "protocol": "record_observation",
>       "coverage": "records",
>       "consistency": "observations",
>       "atomicity": "record",
>       "history": "observations",
>       "recordRefresh": false,
>       "reconciliation": false,
>       "notifications": false,
>       "snapshotMaxRows": null,
>       "profile": {
>         "movement": {
>           "exchanges": {},
>           "nativeInputLimitBytes": "53398872",
>           "steps": [
>             {
>               "id": "acquire.1",
>               "inputs": [],
>               "action": {
>                 "operation": "acquire",
>                 "subject": "native input",
>                 "limitBytes": "53398872"
>               }
>             },
>             {
>               "id": "retain.1",
>               "inputs": [
>                 "acquire.1"
>               ],
>               "action": {
>                 "operation": "retain",
>                 "subject": "acquisition evidence",
>                 "reason": "recovery",
>                 "release": "acquisition_custody"
>               }
>             },
>             {
>               "id": "interpret.1",
>               "inputs": [
>                 "retain.1"
>               ],
>               "action": {
>                 "operation": "interpret",
>                 "subject": "acquired input",
>                 "produces": "records"
>               }
>             },
>             {
>               "id": "materialize.1",
>               "inputs": [
>                 "interpret.1"
>               ],
>               "action": {
>                 "operation": "materialize",
>                 "subject": "source rows",
>                 "reason": "serving",
>                 "release": "replacement"
>               }
>             },
>             {
>               "id": "publish.1",
>               "inputs": [
>                 "materialize.1"
>               ],
>               "action": {
>                 "operation": "publish",
>                 "subject": "source rows",
>                 "visibility": "with_acquisition"
>               }
>             }
>           ]
>         },
>         "initial": "enumeration",
>         "changes": "observations",
>         "deletions": "explicit_events",
>         "resume": "opaque_cursor",
>         "retentionMs": null,
>         "gap": "explicit_repair",
>         "limits": {
>           "exchange_evidence_bytes": "4194304",
>           "publication_page_records": "128",
>           "record_fields": "32"
>         },
>         "restrictions": [
>           "Independent mailbox observations; content and membership gaps do not establish complete population"
>         ],
>         "commands": {}
>       }
>     }
>   },
>   "occurrences": null,
>   "artifacts": {
>     "raw_archive": false,
>     "native_file_transfer_limit_bytes": "53398872",
>     "external_versions": false,
>     "files": {}
>   },
>   "commands": {}
> }
> ```

**Recorded checks**

| Requirement | Scope | Evidence | Result |
| - | - | - | - |
| page-publication-recovery | \{"kind":"collection","name":"contents"} | No case-scoped check receipt covers this requirement. The native EWS transport's unit cases (connector\_documents mail::ews) run against an in-process peer, and no real Exchange server has been reached. | Execution result unavailable |
| page-publication-recovery | \{"kind":"collection","name":"memberships"} | No case-scoped check receipt covers this requirement. The native EWS transport's unit cases (connector\_documents mail::ews) run against an in-process peer, and no real Exchange server has been reached. | Execution result unavailable |
| page-publication-recovery | \{"kind":"collection","name":"messages"} | No case-scoped check receipt covers this requirement. The native EWS transport's unit cases (connector\_documents mail::ews) run against an in-process peer, and no real Exchange server has been reached. | Execution result unavailable |
| group-publication-recovery | \{"kind":"group"} | No case-scoped check receipt covers this requirement. The native EWS transport's unit cases (connector\_documents mail::ews) run against an in-process peer, and no real Exchange server has been reached. | Execution result unavailable |

Hosted qualification: **unestablished for this catalog configuration**. Installed connections report their own identity, authority and current status.

## Provider guidance

Compiled declaration examples and configuration details are published in the [connector reference](https://docs.bijection.com/integrations/connectors/index).

Reads an Exchange Server (on-premises) mailbox through Exchange Web Services
into the same `messages`, `contents` and `memberships` tables as the IMAP
mailbox. Bind the connection's `ews` endpoint (`host`, `port`, `security:
"implicit_tls"`; EWS is HTTPS only) and `folders`: a distinguished folder id
(`inbox`, `calendar`, `sentitems`, ...) optionally followed by `/`-separated
display names below it (`inbox/Projects`), at most eight. The private `mailbox`
credential (`exchangeEws.credential`) holds `auth`:

* `{ kind: "ntlm", username, password, domain? }`: NTLMv2 bound to the TLS
  channel and to `HTTP/<host>`, as Extended Protection requires.
* `{ kind: "basic", username, password }`.
* `{ kind: "kerberos", principal, keytab, kdc, service? }`: a keytab ticket to
  `HTTP/<host>` (or `service`), checked for mutual authentication.

and optionally `trusted_certificate`, a private authority (PEM) the server is
verified against. A `network` route (relay or private endpoint) carries the EWS
connection; a Kerberos installation's KDCs are reached directly.

Each folder is read with `SyncFolderItems`: the first pass is a baseline that
states the folder's members, later passes state each creation, update, deletion
and read-state change. A deletion withdraws membership, never the message. A
refused sync state or a folder that was replaced restarts as continuity loss.
Bodies are `GetItem` MIME; a calendar item's carries its iCalendar. The
connector reads only: no sending, no notifications, no impersonation and no
Autodiscover. No real Exchange server has been reached by these checks.

## Provider references

Provider references and prerequisites are maintained in the connector guidance above. No separate provider-documentation review date is recorded.

## Source and evidence

[Canonical connector source](https://github.com/bijectionhq/component-support/blob/b632604330ce9cbcfe17a5a680ef4fbe80f6f672/packages/connectors/src/connectors/exchange-ews/README.md), [native analysis](https://github.com/bijectionhq/component-support/blob/b632604330ce9cbcfe17a5a680ef4fbe80f6f672/packages/connectors/contract-analysis.json) and [check receipts](https://github.com/bijectionhq/component-support/blob/b632604330ce9cbcfe17a5a680ef4fbe80f6f672/packages/connectors/evidence.json).

Connector artifact: `905888ea276a2a28e36981a79e8142b2547ea451c3e63162cb6915ad4a7d1305`.

The resource declaration examples above are compiled and compared with exact catalog declarations. Recorded checks apply only to their source, declaration and runtime identities. Configure a connection and inspect its status to establish deployment-specific readiness.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.