# Microsoft Ads

## Authentication methods

#### OAuth

{% hint style="warning" %}
Getting authentication credentials to work with this API can be difficult.

Please follow the instructions carefully, but feel free to contact us if you are unable to successfully create a connection.
{% endhint %}

1. In order to obtain the client id, client secret and tenant id, follow [these instructions](https://learn.microsoft.com/en-us/advertising/guides/authentication-oauth-register?view=bingads-13).
2. Once your app is registered add an authorised URL for your Snowflake account. The following Snowflake query will construct the correct value for your account:\
   \
   `select 'https://'||t.value:host::varchar||'/oauth/complete-secret' as URI from table(flatten(input => parse_json(system$allowlist()))) as t where t.value:host::varchar LIKE 'apps-api%';`\\
3. Follow [these instructions](https://learn.microsoft.com/en-us/advertising/guides/get-started?view=bingads-13#get-developer-token) to get a developer token.

## Inbound Syncs

The following streams are supported:

* accounts
* campaigns
* ad sets
* ads
* report\_campaign\_daily (basic campaign metrics at a daily granularity)

## Outbound Syncs

Currently there is no outbound sync functionality, but uploading offline conversions is coming soon!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.omnata.com/omnata-product-documentation/omnata-sync-for-snowflake/apps/microsoft_ads.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
