A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
- GetCampaignsByAccountId can return an empty Campaigns array while the Bulk API returns campaigns because they are different services with different behaviors and filters. The Bulk service is optimized for background download/upload of campaign entity data and, as documented, can download specific campaigns by account via operations such as DownloadCampaignsByAccountIds and objects such as CampaignScope. The Campaign Management GetCampaignsByAccountId operation, on the other hand, returns campaigns according to its own request parameters (e.g., CampaignType, ReturnAdditionalFields) and may not return entities that do not match those filters. In the provided SOAP response, the call is successful and returns an empty
<Campaigns/>element, which indicates that the service did not find any campaigns matching the specified criteria for that request, not that the account has no campaigns. The Bulk API confirming an active Audience campaign only shows that the campaign exists; it does not guarantee that it matches the CampaignType filter or other internal criteria applied by GetCampaignsByAccountId. - From the provided documentation, GetCampaignsByAccountId does not list any special exclusion or limitation for Audience campaigns specifically. The Campaign data object explicitly supports Audience as a valid CampaignType, and the Settings element description states that the TargetSetting can be used with any campaign type except Performance Max. There is no mention in the context of Audience or lifetime‑budget campaigns being filtered out or hidden by GetCampaignsByAccountId. The only documented behavior relevant here is that some campaign settings are only returned if requested via ReturnAdditionalFields (for example, TargetSetting), but that affects which fields are populated on returned campaigns, not whether the campaigns are returned at all.
- The documented pattern for CampaignType in GetCampaignsByAccountId is to pass the campaign types that should be retrieved. Audience is a supported campaign type in the Campaign object description. The FAQ guidance in the context recommends using the Bulk service when managing many entities across campaigns, but for features not available in Bulk (such as certain settings) the Campaign Management service must be used. Based on the context, a reasonable request pattern is:
- Use GetCampaignsByAccountId with CampaignType including the specific types needed (e.g., Audience, Shopping, DynamicSearchAds, etc.).
- Use ReturnAdditionalFields only for fields that are needed, such as TargetSetting, ShoppingSetting, or other settings that are not returned by default.
References: