Skip to main content

Overview

This source syncs performance reports from the Microsoft Advertising API (Bing Ads API v13) using the official bingads Python SDK. Reports are requested asynchronously: the connector submits a report request, polls until the result is ready, downloads the data, and emits one record per row. All three streams use daily aggregation by default and sync incrementally on TimePeriod per ad account, so only new or updated days are fetched on subsequent runs. Authentication uses OAuth 2.0 with a refresh_token (no service accounts). You provide an Azure AD application’s client_id (and optionally client_secret) alongside a developer_token that identifies your API application.

Configuration

Legacy key: accounts is accepted as an alias for account_ids for backwards compatibility.

Sample configs

Minimal — production environment, daily reports:
Confidential app flow (with client secret):
Sandbox testing:

Streams

All streams sync incrementally on TimePeriod (one bookmark per ad account). On the first run the full history from start_date is fetched; subsequent runs fetch only new or updated days.

How to get credentials

1. Developer token

  1. Sign in to Microsoft Advertising as the account owner or a user with API access.
  2. Go to Tools → API Center (or visit the Microsoft Advertising API Center directly).
  3. Request and copy your developer token.

2. Azure AD app (client_id / client_secret)

  1. Open Azure Portal → App registrations and click New registration.
  2. Choose Public client / native for desktop flows (no client_secret required) or Web for server flows.
  3. Add https://login.microsoftonline.com/common/oauth2/nativeclient as a redirect URI (or your own URI for web flows).
  4. Copy the Application (client) IDclient_id.
  5. For web flows: go to Certificates & secrets and create a client secret → client_secret.

3. Refresh token

Use the Microsoft Advertising OAuth guide to complete the authorization code flow with the scope https://ads.microsoft.com/msads.manage offline_access. Copy the resulting refresh_token into your config.

4. customer_id and account_ids

Find these in the Microsoft Advertising UI:
  • Customer ID — shown in the top-right account selector next to your account name.
  • Account IDs — visible in Accounts Summary or each account’s settings page.