> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# Microsoft Ads

Supports:
* ✅ Model sync destination
* ✅ Bulk sync source




## Connection

### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>auth_method</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Authentication method<br/><br/>Accepted values: `microsoft`, `google`</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>auto_add_accounts</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Automatically add new accounts</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>client_id</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;"></td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>client_secret</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;"></td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>oauth_refresh_token</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;"></td>
<td><code>false</code></td>
</tr>
</tbody>
</table>

<h4 id="oauth-token-expiry">`oauth_token_expiry`</h4>

<h5 id="oauth-token-expiry-<nil>">When `oauth_token_expiry` has a value</h5>

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>accounts</code></td>
<td><code>array</code></td>
<td style="vertical-align: top;">Accounts</td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>agree_customer_match_terms</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Agree to Microsoft's [Customer Match Terms](https://help.ads.microsoft.com/#apex/ads/en/56921/1) when syncing audiences</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>



#### Example

```json
{
  "name": "Microsoft Ads connection",
  "type": "msads",
  "configuration": {
    "auth_method": "",
    "auto_add_accounts": false,
    "client_id": "a45gadsfdsafbyorxhugfbhsgllpf12gf56gfds",
    "client_secret": "ay8d5hdepz62px8lqeoakuea2ccl4rxm13i6tbyorxhu1i20kc8ruvksmzxq",
    "oauth_refresh_token": "dasfdasz62px8lqeoakuea2ccl4rxm13i6tbyorxhu1i20kc8ruvksmzxq"
  }
}
```

### Read-only properties
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>username</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Connected user</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>


## Model Sync
### Target
Microsoft Ads connections may be used as the destination in a model sync.




### Target creation

Microsoft Ads connections may be used to create a new target for a model sync. The
following parameters are required to create a new target:

<table>
<thead>
<tr>
  <th>NAME</th>
  <th>DESCRIPTION</th>
  <th>ENUM</th>
</tr></thead>
<tbody>
<tr>
  <td>account</td>
  <td>Account ID</td>
  <td>true</td>
</tr>

<tr>
  <td>name</td>
  <td>Audience name</td>
  <td>false</td>
</tr>

</tbody>
</table>




## Bulk Sync
### Source
#### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>reporting_lookback</code></td>
<td><code>integer</code></td>
<td style="vertical-align: top;">Lookback period for reports</td>
<td><code>false</code></td>
</tr>
</tbody>
</table>


#### Example
```json
{
  ...
  "source_configuration": {
    "reporting_lookback": 0
  }
}
```