# Microsoft Advertising

> Connect Microsoft Advertising to sanda: what to prepare, the fields the connection form asks for, and how its data lands in your warehouse.

## Connect Microsoft Advertising

:::steps
1. **Open the catalogue.** In the console, go to **Data · Connections** and press **New connection**.
2. **Choose Microsoft Advertising.** It is listed under marketing and analytics; you can also search for it by name.
3. **Fill in the form.** Enter the fields below. Credentials go straight to sanda’s sync engine and are never stored in sanda’s database.
4. **Choose what to sync.** Pick the streams you want, and a sync mode for each. See [choose what to sync](https://docs.sanda-os.com.au/connections/choose-streams).
5. **Run the first sync.** sanda tests the connection, then lands each stream as a table in your warehouse.
:::

## Configuration fields

What the connection form asks for. Required fields are marked; the rest are optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| **Tenant ID** | string, secret | No | The Tenant ID of your Microsoft Advertising developer application. Set this to "common" unless you know you need a different value. |
| **Client ID** | string, secret | Yes | The Client ID of your Microsoft Advertising developer application. |
| **Client Secret** | string, secret | No | The Client Secret of your Microsoft Advertising developer application. |
| **Refresh Token** | string, secret | Yes | Refresh Token to renew the expired Access Token. |
| **Developer Token** | string, secret | Yes | Developer token associated with user. |
| **Account Names Predicates** | array | No | Predicates that will be used to sync data by specific accounts. |
| **Reports replication start date** | string | No | The start date from which to begin replicating report data. Any data generated before this date will not be replicated in reports. This is a UTC date in YYYY-MM-DD format. If not set, data from previous and current calendar year will be replicated. |
| **Lookback window** | integer | No | Also known as attribution or conversion window. How far into the past to look for records (in days). If your conversion window has an hours/minutes granularity, round it up to the number of days exceeding. Used only for performance report streams in incremental mode without specified Reports Start Date. Default `0`. |
| **Number of concurrent workers** | integer | No | The number of worker threads to use for the sync. Increase this to speed up syncs for accounts with many reports. The default should work for most use cases. Default `10`. |
| **Custom Reports** | array | No | You can add your Custom Bing Ads report by creating one. |

## Related

:::links
- [Sync modes](https://docs.sanda-os.com.au/connections/sync-modes): How sanda reads each stream on every run.
- [Sync schedules](https://docs.sanda-os.com.au/connections/schedules): How often a connection runs.
- [Allowlist sanda’s address](https://docs.sanda-os.com.au/connections/allowlist): For a system behind a firewall.
- [Troubleshoot connections](https://docs.sanda-os.com.au/connections/troubleshooting): What an error means and how to fix it.
:::
