Design note — Microsoft Advertising connector (microsoft_ads)
Target registry item: C7 (catalog row only — available: false, wave 4, demand-driven). Status: design note only — NOT built. The catalog row enumerates the six fields below so the onboarding surface can say "not yet available" and name what a build would collect (the ShareASale pattern, checklist §5.2); posting any payload is refused 409 provider_not_available. The adapter is built only when a tenant declares demand (docs/OPEN_ITEMS.md row). CDoD points 1–14 tracked in docs/reports/ONBOARDING_CONNECTORS_STATE.md.
Auth
Read-only, merchant-owned (D2/D11). The Bing Ads API (Microsoft Advertising API v13) needs two things (vendor get-started page, fetched 2026-10-12): a developer token, requested by a Super Admin of the customer's Microsoft Advertising account from the Developer Portal (now under the account's developer settings; the universal token type is the default), and an OAuth user access token from the Microsoft identity platform, obtained by registering an application, requesting the user's consent and exchanging for access + refresh tokens. The developer token grants no extra account permissions — the authorized user's roles decide what is visible.
The C7 field set is the bring-your-own-app shape (the customer's app registration and the customer's developer token), the same posture as the google_ads typed card and with the same small-business limitation OB-GAP-1 names. A platform OAuth door with a platform developer token would be a later, owner-ruled item on Track O.
Vault-only per (tenant, provider); no environment fallback; vault error 503; absence merchant_credentials_not_configured.
Fields (catalog row)
| key | label | secret | required | pattern | help |
|---|---|---|---|---|---|
developer_token |
Developer token | yes | yes | — | Requested by a Super Admin from Microsoft Advertising → developer settings (Request Token). Production and sandbox tokens differ; supply the production one. Never echoed. |
oauth_client_id |
OAuth application (client) ID | no | yes | — | The Application (client) ID of the app registered in your Microsoft account / Entra app registrations. |
oauth_client_secret |
OAuth client secret | yes | yes | — | A client secret created on that app registration. Never echoed. |
refresh_token |
OAuth refresh token | yes | yes | — | Issued when the account user consents to the app (offline access). Never echoed. |
customer_id |
Customer ID | no | yes | ^\d+$ |
The cid value in the Microsoft Advertising URL when you open Campaigns; also under Accounts & Billing. Digits only. |
account_id |
Account ID | no | yes | ^\d+$ |
The aid value in the same URL. This is the account identifier, not the eight-character account number shown in the UI. Digits only. |
Scopes
The API has a single delegated scope (msads.manage) plus offline_access for the refresh token; it is not read-only by construction, so read-only is enforced by the adapter: it calls Reporting and read operations only, and a test fails the build if any write operation name appears in the adapter.
Data topics
Reporting service: campaign / ad group / keyword performance (impressions, clicks, spend, conversions) by day; account structure. Aggregates. Customer Match / audience uploads and offline conversions are out of scope.
Consent posture
Aggregates only; posture test pins that no mapper output field is person-level.
Mapper target
Paid-media pull adapter → MAPPERS["microsoft_ads"] → ingest_gate → mizoki_unified_data, beside google_ads. No new store; no writeback.
Failure modes → test-connection verdicts
| Failure | Verdict / fix |
|---|---|
customer_id / account_id not digits, or the account number typed as the id |
422 invalid_field_format with the help text. |
Identity platform refuses the refresh (invalid_grant) |
token_invalid → re-consent the app. |
| API answers that the developer token is invalid or not approved | developer_token_invalid → request/activate the production token as a Super Admin. |
| API answers that the user is not authorized for the customer/account | permission_denied → the consenting user needs a role on that account. |
| Sandbox developer token against production | wrong_environment. |
| Vault read error | 503 fail-closed. |
Flag
MICROSOFT_ADS_SYNC default OFF; available: false until CDoD point 14 (live verification against a customer-owned account, recorded with date and revision).
Owner / operator gates
- Owner: a platform door (platform app registration + platform developer token approval) is a ruling; the bring-your-own row needs none.
- Operator: none for the row; Track O only if the door is ruled in.
Vendor references
- Microsoft Advertising API — Get started (learn.microsoft.com/en-us/advertising/guides/get-started): fetched 2026-10-12; source for the developer-token request path, universal token,
cid/aididentifiers, and the account-number vs account-id distinction. - Microsoft Advertising API — Authentication with OAuth (learn.microsoft.com/en-us/advertising/guides/authentication-oauth): URL as recorded; not re-fetched from this sandbox on 2026-10-12.