Error 1125 "The specified customer life cycle status is invalid or not supported" when fetching accounts info via Bing Ads API

Fivetran D 1 Reputation point
2022-03-28T08:02:02.297+00:00

Hello,

we faced the error with the code which is not listed in documentation : "Error { code: 1125, errorCode: null, message: The specified customer life cycle status is invalid or not supported. }" when trying to fetch accounts info via Bing Ads API:

curl -X POST --data '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>  
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">  
    <s:Header xmlns="https://bingads.microsoft.com/Customer/v13">  
        <AuthenticationToken>***</AuthenticationToken>  
        <DeveloperToken>***</DeveloperToken>  
    </s:Header>  
    <s:Body>  
        <GetAccountsInfoRequest xmlns="https://bingads.microsoft.com/Customer/v13"/>  
    </s:Body>  
</s:Envelope>  
' -H 'SOAPAction: GetAccountsInfo' -H 'Content-Type: text/xml' -A 'Jersey/2.31' 'https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc'  

What can be a cause of such error?

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.
424 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amichay Miara 6 Reputation points
    2022-06-14T13:45:01.817+00:00

    Solved it by adding the optional (?!) request body element CustomerId.
    You can obtain the CustomerId by querying GetUser.

    1 person found this answer helpful.
    0 comments No comments

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.