.png)
Microsoft Advertising Integration Guide
Integrate Microsoft Advertising with enterprise systems through SOAP and selected REST APIs, asynchronous reporting and bulk operations, OAuth 2.0, and scheduled Martini workflows.
Microsoft Advertising integration options at a glance
Microsoft Advertising supports SOAP services as a primary integration mechanism for campaign management, customer management, reporting, bulk operations, and advertising insights. Selected capabilities are also available through REST APIs. Bulk campaign changes and reports use asynchronous jobs, polling, and downloadable or uploadable files. OAuth 2.0 works with a developer token, customer ID, account ID, and user permissions. General-purpose webhooks for campaign and reporting changes should not be assumed, so scheduled retrieval, pagination, and change-history queries are commonly used. Martini can orchestrate these calls, transform XML, JSON, and bulk files, apply validation and business rules, and persist results in downstream systems.
Common Microsoft Advertising integration patterns
Common Microsoft Advertising data objects used in integrations
Authentication and security considerations
OAuth 2.0 and application consent
Microsoft Advertising integrations generally use Microsoft identity platform OAuth 2.0 authorization. Access tokens are sent as bearer tokens and refresh tokens support continued access without repeated user authorization.
Application and account context
Requests commonly require a developer token, CustomerId, and AccountId in addition to OAuth credentials. The authenticated user must have permission to access the relevant customer and account.
Martini configuration
- Store client credentials, refresh tokens, developer tokens, customer identifiers, and account identifiers in secured environment configuration.
- Keep account-level configuration isolated when workflows process multiple advertising accounts.
- Do not embed secrets in workflow definitions, mappings, files, or source-controlled assets.
Operational considerations for Microsoft Advertising integrations
Rate limits and pagination
Use controlled concurrency, backoff for throttling, and page iteration for collection operations. Do not assume one request returns all campaigns, ad groups, ads, or keywords.
Asynchronous jobs
Reporting and bulk workflows need persisted operation IDs, polling delays, maximum durations, and handling for failed, expired, or partial results.
Idempotency and checkpoints
Use stable object identifiers, operation IDs, input-file hashes, and synchronization checkpoints to avoid duplicate updates. Commit checkpoints only after downstream writes succeed.
Data consistency
Change history has a supported time window, and reporting metrics may change as attribution and conversions arrive. Reprocess a recent overlap window and account for deleted or related objects.
Transformation and schema changes
SOAP responses, report files, and bulk files can contain nested structures, enumerations, and service-specific types. Validate unexpected fields and enum values while tolerating additive fields where possible.
Testing and monitoring
Test each Microsoft Advertising service contract and account scope separately. Monitor authentication refreshes, polling timeouts, throttling, rejected bulk rows, report freshness, and downstream write failures.
Why use Martini instead of scripts or point-to-point integrations?
Orchestration beyond scripts
Microsoft Advertising integrations combine SOAP and REST calls, paginated retrieval, asynchronous polling, report downloads, bulk files, and downstream persistence. Martini coordinates these stages in workflows instead of leaving state and retry behavior inside one-off scripts.
Reusable transformation and business rules
Martini provides reusable mappings, validation, transformations, account routing, and canonical models for campaign and reporting data. This helps separate vendor-specific service contracts from downstream application models.
Controlled operations
Martini can expose APIs for approved change requests, schedule synchronization, protect credentials through environment configuration, and apply consistent error handling, checkpoints, retries, and monitoring across accounts.
Maintainability
Separating retrieval, polling, transformation, and persistence makes changes to Microsoft Advertising services or target systems easier to test and deploy than tightly coupled point-to-point scripts.