Issue with Reporting API and CampaignPerformanceReportRequest

Stefanos Petrakis 0 Reputation points
2024-12-28T20:40:39.3166667+00:00

Encountering a challenge when trying to send a CampaignPerformanceReportRequest using AccountThroughCampaignReportScope.

The intent is to set AccountThroughCampaignReportScope.Campaigns while leaving AccountThroughCampaignReportScope.AccountIds empty, null, or unset.

According to the documentation:

The report scope includes a union of the AccountIds and Campaigns elements. You must include at least one of these elements.

This leads to the assumption that AccountIds can be omitted when Campaigns is set.

However, the results are identical when specifying an AccountId and varying Campaigns, which aligns with the expectation that a union of AccountIds and Campaigns results in a scope defined by AccountIds, irrespective of Campaigns.

The goal is to avoid setting AccountIds and restrict the scope to a single Campaign. Unfortunately, this fails since the Reporting API requires AccountIds to be included, resulting in the following error:

ErrorCode: InvalidAccountThruCampaignReportScope
Message: The specified account through campaign report scope does not contain valid values. Please submit a report request with valid scope and ids.

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
434 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.