ETLMCPData Conveyance Works
Log in Start free
Docs

Microsoft Advertising connector errors

What each Microsoft Advertising error on a run means, which ones etlmcp retries by itself, and what you do about sign-in, account and report errors.

Coming This connector is coming.

When the connector is available, etlmcp reads the numeric code in each Microsoft Advertising fault and sorts it into one of four answers: the sign-in needs renewing (codes 105 and 109), the ad account can no longer be reached (106, 208, 2003, 2023 and 2035), Microsoft is limiting requests (117 and 207), or Microsoft had a temporary problem (0 and 2004). Limits and temporary problems are retried by themselves. Sign-in and account errors are not: they end the run as failed until you reconnect, or until the account can be reached again. A failed report file is requested again; a report that disagrees with what was asked for ends the run.

What the connector reads and writes is on the Microsoft Advertising connector page.

How a fault is read

Each error item Microsoft returns carries a numeric code, and most carry a symbolic name too. Some services send no symbol, so etlmcp relies on the number. It reads every error item in the answer, and when there is more than one, the most serious one decides: a sign-in problem first, then account access, then a request limit, then a temporary problem. A code etlmcp does not know is judged by the HTTP status instead: a 401 counts as a sign-in problem, a 429 as a limit, and a 408 or any 5xx as temporary. Anything else ends the run with Microsoft's own code, symbol and message, shortened, with any credential the request carried removed from the text.

The account codes count as account errors only on reporting calls. Microsoft reuses some of those numbers with other meanings in its other services, so elsewhere they are ordinary errors.

Sign-in errors: 105 and 109

Code 105 is Microsoft's InvalidCredentials and 109 is AuthenticationTokenExpired. When either comes back, etlmcp renews the access token once and sends the call again. If the renewed token is refused too, the run fails with Microsoft Advertising needs reconnecting, the connection is marked as needing a new sign-in, and the organization's owners get one email about it. Reconnect the connection in etlmcp; see expiring connections.

There is one exception. Microsoft's code list says 105 can also mean a wrong developer token or credentials meant for another environment, which no reconnect can fix. So a second plain 105 does not mark your connection dead: the run fails with a message that starts microsoft refused a renewed sign-in (error 105) and says Microsoft Advertising may not be set up correctly on the server. Only a 105 whose details say the user was not found is treated as yours to fix.

Account access errors: 106, 208, 2003, 2023, 2035

These codes say the account in the report request is not valid or the person who connected it has no right to it: 106 is UserIsNotAuthorized, 208 InvalidAccount, and 2003, 2023 and 2035 are reporting errors about accounts you may not read or identifiers that are not valid. A 403 on a reporting call whose body is empty or JSON with no fault in it, or with a fault that has no code, is read the same way. The run fails with this ad account is no longer accessible, it is not retried, the source is marked invalid, and the owners get one email about it. Only that source is marked: other accounts on the same connection keep syncing. Check in Microsoft Advertising that the user you connected with still has access to the account, then press Check again next to the source on the Sources page, or reconnect: either one lists the login's accounts again and marks the source OK if it is back. The account picker explains how sources are added.

Request limits: 117 and 207

Microsoft's services protocol page names 117 (CallRateExceeded) as the per-minute call limit of its Ad Insight and Campaign Management services, which you may retry after 60 seconds, and 207 (ConcurrentRequestOverLimit) as too many report jobs running at once, to be retried after earlier reports finish. etlmcp waits as long as a Retry-After header on the answer says; without one it waits the time Microsoft's guidance gives for 117, and for 207 it adds a small random delay so that several runs do not all try again at the same moment. etlmcp also submits a run's report jobs one after the other, so a run never holds more than one of those slots.

If the waits inside one attempt run out, the attempt ends with microsoft is limiting requests (error {…}), where {…} is the code. That is a temporary failure: the whole run is tried again, up to 3 attempts in all, as retries explains.

Temporary problems: 0 and 2004

Code 0 is Microsoft's InternalError. Code 2004 means a report asked for complete data while only partial data is ready in the time zone of one or more of its campaigns. Both are retried inside the attempt after short waits that grow each time; if they persist, the attempt ends with microsoft had a temporary problem (error {…}) and the run is tried again later. The same message is used when a fault with a code etlmcp does not know comes back with a 408 or a 5xx status.

Report errors

For each date window, a sync asks Microsoft to build two reports, one at ad level and one at campaign level. It polls each until it is ready and downloads a ZIP that should hold one CSV file. If Microsoft says a job failed, the run fails with microsoft could not build the report; it will be requested again, and the retry submits a new job.

The download is checked before any row is kept. These are temporary, so the run is tried again:

  • microsoft report download failed: the file could not be fetched. A retry asks for a new report, with a new address.
  • microsoft report download was not a readable archive or microsoft report archive did not hold exactly one file: the ZIP was broken or held the wrong number of files.
  • microsoft report was not readable text or microsoft report was not readable CSV: the file inside could not be read.
  • microsoft report did not say how many rows it holds: the row count line Microsoft writes at the top of the file was missing.
  • microsoft report was incomplete ({…} of {…} rows): fewer rows arrived than the file declared. A short file is never stored as if it were complete.

These are treated as permanent, so the run is not tried again:

  • microsoft report did not have the requested columns and microsoft report had a row we could not read
  • microsoft report held a value that is not a number and microsoft report held a day outside the requested range
  • microsoft report held rows for another account and microsoft report did not say which currency the account uses

A report too big to hold is split in half by date and requested again, down to single days. If one day alone is still too big, the run fails with one day of this Microsoft Advertising account's report is too large.

A failed run's message shows next to its status on the Runs page and on the pipeline's page, where a long one is shortened. You can also read it with get_run or Get a run. What each run status means is on run statuses.

Related

Sources

  1. Bing Ads API Services Protocol — learn.microsoft.com, checked
  2. Bing Ads API Operation Error Codes — learn.microsoft.com, checked