> ## 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.

# Microsoft Advertising

> Resources, examples, configuration and evidence for Microsoft Advertising.

Use the `@bijection/connectors/microsoft-advertising` entrypoint to declare Microsoft Advertising 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 |
| - | - | - |
| Daily performance reports | `daily` | Daily performance rows from asynchronous report requests, one per pass |

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).

## Daily performance reports

### daily: Daily performance rows from asynchronous report requests, one per pass

The following example matches configuration `campaigns`.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { microsoftAdvertising } from "@bijection/connectors/microsoft-advertising";
export const campaignDays = microsoftAdvertising.performance.daily({
  start: "2026-01-01",
  level: "campaign",
  metrics: ["Impressions", "Clicks", "Spend", "Conversions"],
  breakdowns: ["DeviceType"],
});
```

> **Inferred record types**
>
> ```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> Resource without an operational record table
> ```

#### Configuration: campaigns

Case: `microsoft-advertising/performance/daily/campaigns`.

Connection and resource configuration are declared by this exact case.

Credential kind: `microsoft-advertising`. Keep credential material in the private credential inventory.

| Setting | Type | Required | Owner |
| - | - | - | - |
| `customerId` | string | Yes | Shared connection |
| `accountId` | string | Yes | Shared connection |

> **Complete configuration contract**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "setup": [],
>   "resource": {
>     "access": {},
>     "defaults": {},
>     "connector": "microsoft-advertising",
>     "output": {
>       "kind": "single",
>       "collection": "performance"
>     },
>     "credential_kind": "microsoft-advertising",
>     "connection_fields": [
>       "customerId",
>       "accountId"
>     ],
>     "address": {
>       "kind": "fixed",
>       "url": "https://reporting.api.bingads.microsoft.com/Reporting/v13"
>     }
>   },
>   "connection_setup": {
>     "type": "object",
>     "value": {
>       "customerId": {
>         "fieldType": {
>           "type": "string"
>         },
>         "optional": false
>       },
>       "accountId": {
>         "fieldType": {
>           "type": "string"
>         },
>         "optional": false
>       }
>     }
>   },
>   "execution": null
> }
> ```

Native admission analysis is available for this exact declaration.

**Collection: performance**

| Contract | Meaning |
| - | - |
| Initial | Enumeration of observed records |
| Changes | Repeated observations of current records |
| Deletions | Deletion detection unsupported |
| Resume | No continuation |
| Gap | Not applicable |
| Retention | Unspecified |

> **Complete native profile**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "movement": {
>     "exchanges": {
>       "poll": {
>         "200": {
>           "placement": "retained_bytes",
>           "interpretation": "json",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         },
>         "400": {
>           "placement": "retained_bytes",
>           "interpretation": "opaque",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         },
>         "401": {
>           "placement": "retained_bytes",
>           "interpretation": "opaque",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         },
>         "403": {
>           "placement": "retained_bytes",
>           "interpretation": "opaque",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         },
>         "500": {
>           "placement": "retained_bytes",
>           "interpretation": "opaque",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         }
>       },
>       "report": {
>         "200": {
>           "placement": "retained_bytes",
>           "interpretation": "document",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         },
>         "403": {
>           "placement": "retained_bytes",
>           "interpretation": "opaque",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         },
>         "404": {
>           "placement": "retained_bytes",
>           "interpretation": "opaque",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         }
>       },
>       "submit": {
>         "200": {
>           "placement": "retained_bytes",
>           "interpretation": "json",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         },
>         "400": {
>           "placement": "retained_bytes",
>           "interpretation": "opaque",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         },
>         "401": {
>           "placement": "retained_bytes",
>           "interpretation": "opaque",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         },
>         "403": {
>           "placement": "retained_bytes",
>           "interpretation": "opaque",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         },
>         "500": {
>           "placement": "retained_bytes",
>           "interpretation": "opaque",
>           "projectsBeforeRetention": false,
>           "retainedBodyLimitBytes": "524288",
>           "fileLimitBytes": null
>         }
>       }
>     },
>     "nativeInputLimitBytes": null,
>     "steps": [
>       {
>         "id": "acquire.1",
>         "inputs": [],
>         "action": {
>           "operation": "acquire",
>           "subject": "exchange poll",
>           "limitBytes": null
>         }
>       },
>       {
>         "id": "acquire.2",
>         "inputs": [],
>         "action": {
>           "operation": "acquire",
>           "subject": "exchange report",
>           "limitBytes": null
>         }
>       },
>       {
>         "id": "acquire.3",
>         "inputs": [],
>         "action": {
>           "operation": "acquire",
>           "subject": "exchange submit",
>           "limitBytes": null
>         }
>       },
>       {
>         "id": "retain.1",
>         "inputs": [
>           "acquire.1",
>           "acquire.2",
>           "acquire.3"
>         ],
>         "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": "unsupported",
>   "resume": "none",
>   "retentionMs": null,
>   "gap": "not_applicable",
>   "limits": {
>     "http_response_bytes": "524288"
>   },
>   "restrictions": [],
>   "commands": {}
> }
> ```

> **Commands, occurrences and artifacts**
>
> ```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> {
>   "records": {
>     "performance": {
>       "protocol": "record_observation",
>       "coverage": "records",
>       "consistency": "observations",
>       "atomicity": "record",
>       "history": "observations",
>       "recordRefresh": false,
>       "reconciliation": false,
>       "notifications": false,
>       "snapshotMaxRows": null,
>       "profile": {
>         "movement": {
>           "exchanges": {
>             "poll": {
>               "200": {
>                 "placement": "retained_bytes",
>                 "interpretation": "json",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               },
>               "400": {
>                 "placement": "retained_bytes",
>                 "interpretation": "opaque",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               },
>               "401": {
>                 "placement": "retained_bytes",
>                 "interpretation": "opaque",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               },
>               "403": {
>                 "placement": "retained_bytes",
>                 "interpretation": "opaque",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               },
>               "500": {
>                 "placement": "retained_bytes",
>                 "interpretation": "opaque",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               }
>             },
>             "report": {
>               "200": {
>                 "placement": "retained_bytes",
>                 "interpretation": "document",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               },
>               "403": {
>                 "placement": "retained_bytes",
>                 "interpretation": "opaque",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               },
>               "404": {
>                 "placement": "retained_bytes",
>                 "interpretation": "opaque",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               }
>             },
>             "submit": {
>               "200": {
>                 "placement": "retained_bytes",
>                 "interpretation": "json",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               },
>               "400": {
>                 "placement": "retained_bytes",
>                 "interpretation": "opaque",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               },
>               "401": {
>                 "placement": "retained_bytes",
>                 "interpretation": "opaque",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               },
>               "403": {
>                 "placement": "retained_bytes",
>                 "interpretation": "opaque",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               },
>               "500": {
>                 "placement": "retained_bytes",
>                 "interpretation": "opaque",
>                 "projectsBeforeRetention": false,
>                 "retainedBodyLimitBytes": "524288",
>                 "fileLimitBytes": null
>               }
>             }
>           },
>           "nativeInputLimitBytes": null,
>           "steps": [
>             {
>               "id": "acquire.1",
>               "inputs": [],
>               "action": {
>                 "operation": "acquire",
>                 "subject": "exchange poll",
>                 "limitBytes": null
>               }
>             },
>             {
>               "id": "acquire.2",
>               "inputs": [],
>               "action": {
>                 "operation": "acquire",
>                 "subject": "exchange report",
>                 "limitBytes": null
>               }
>             },
>             {
>               "id": "acquire.3",
>               "inputs": [],
>               "action": {
>                 "operation": "acquire",
>                 "subject": "exchange submit",
>                 "limitBytes": null
>               }
>             },
>             {
>               "id": "retain.1",
>               "inputs": [
>                 "acquire.1",
>                 "acquire.2",
>                 "acquire.3"
>               ],
>               "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": "unsupported",
>         "resume": "none",
>         "retentionMs": null,
>         "gap": "not_applicable",
>         "limits": {
>           "http_response_bytes": "524288"
>         },
>         "restrictions": [],
>         "commands": {}
>       }
>     }
>   },
>   "occurrences": null,
>   "artifacts": {
>     "raw_archive": false,
>     "native_file_transfer_limit_bytes": null,
>     "external_versions": false,
>     "files": {}
>   },
>   "commands": {}
> }
> ```

**Recorded checks**

| Requirement | Scope | Evidence | Result |
| - | - | - | - |
| page-publication-recovery | \{"kind":"collection","name":"performance"} | Fixture: ./src/connectors/microsoft-advertising/fixtures/submit-catches-up.json | passed (2026-10-24T21:36:12.085Z) |
| page-publication-recovery | \{"kind":"collection","name":"performance"} | Fixture: ./src/connectors/microsoft-advertising/fixtures/submit-refused.json | passed (2026-10-24T21:36:12.086Z) |
| page-publication-recovery | \{"kind":"collection","name":"performance"} | Fixture: ./src/connectors/microsoft-advertising/fixtures/poll-pending.json | passed (2026-10-24T21:36:12.087Z) |
| page-publication-recovery | \{"kind":"collection","name":"performance"} | Fixture: ./src/connectors/microsoft-advertising/fixtures/report-page.json | passed (2026-10-24T21:36:12.088Z) |
| page-publication-recovery | \{"kind":"collection","name":"performance"} | Fixture: ./src/connectors/microsoft-advertising/fixtures/report-inexact-spend-refused.json | passed (2026-10-24T21:36:12.088Z) |
| page-publication-recovery | \{"kind":"collection","name":"performance"} | Fixture: ./src/connectors/microsoft-advertising/fixtures/report-other-account-refused.json | passed (2026-10-24T21:36:12.088Z) |
| page-publication-recovery | \{"kind":"collection","name":"performance"} | Native test: integrations/acquisition/acquisition\_windows\_preserve\_sequences\_and\_restart\_fences\_old\_work (shared\_engine) | Execution result unavailable |
| identity-account | \{"kind":"connection"} | Fixture: ./src/connectors/microsoft-advertising/fixtures/identity.json | passed (2026-10-24T21:36:12.089Z) |
| identity-account | \{"kind":"connection"} | Fixture: ./src/connectors/microsoft-advertising/fixtures/identity-other-account-refused.json | passed (2026-10-24T21:36:12.089Z) |

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).

Read-only daily performance observations from the Reporting API v13, which is
asynchronous only. Each pass submits one report request
(`POST Reporting/v13/GenerateReport/Submit`, `Aggregation: Daily`, a custom date
range of `windowDays`, default 31, scoped to the bound account, CSV with
`FormatVersion` `2.0` and the report header and footer excluded), polls
`POST GenerateReport/Poll` every `pollSeconds` (default 120; Microsoft suggests two
to fifteen minutes) until `Status` is `Success`, and reads the one CSV file of the
ZIP archive at `ReportDownloadUrl`. `Error` ends the pass with a typed gap; a
successful report with no rows names no URL and ends the pass. The download URL
is short-lived storage on a domain Microsoft says not to depend on, so it is read
as a prepared result: no credential or declared header travels to it.

`level` selects the report type (`account`, `campaign`, `adGroup`, `ad`,
`keyword`); rows are keyed by (`AccountId`, `TimePeriod`, the level's identifiers,
`breakdowns` among `DeviceType` and `Network`). Metrics (`Impressions`, `Clicks`,
`Spend`, `Conversions`, `Revenue`, `AllConversions`, `AllRevenue`) are published as
exact decimal text; a value in another spelling fails the page. A row naming
another account fails the page.

Report windows: a pass reads one window from where the last one left off. While
history is being caught up the next pass begins after the window; once a window
reaches today, the next pass begins `restatementDays` back, so those days are read
again. Microsoft states data is generally complete three hours after a click, that
invalid-traffic adjustments can take a week or more, and credits conversions to
the click's day within the conversion window. It states no per-row finality, so
`settled` is true only for a day at least `restatementDays` old when read: 30 days
with a conversion metric, else 14, both recipe choices. A row missing from a later
read is not withdrawn.

Limits: a report file is read whole and published 128 rows per read, so a file of
more rows is downloaded once per 128 rows, and every download must happen within
the five minutes Microsoft keeps the URL valid after the poll; a file beyond 1,024
rows or the host's response bound fails the pass. Narrow the `level`, the
`breakdowns` or `windowDays` for large accounts.

Connection `microsoft-advertising` (`microsoftAdvertising.credential`): an OAuth
2.0 bearer whose envelope also writes the application's `DeveloperToken` header;
setup `customerId` (the manager account, sent as `CustomerId`) and `accountId`
(sent as `CustomerAccountId` and as the report scope). Identity reads
`POST CustomerManagement/v13/Account/Query` under the connection's
`customerManagement` role, bound to
`https://clientcenter.api.bingads.microsoft.com/CustomerManagement/v13` with the
same credential, and requires its `Account.Id` to be the bound account.

Nothing here has run against Microsoft Advertising or been qualified.

## 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/microsoft-advertising/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.