Account and Customer Identifiers
Many Bing Ads service operations require an account ID and some require a customer ID.
The account identifier is a numeric identifier that identifies an account.
Many of the campaign management operations require that you specify the account identifier in the body of a request message. For example, the GetCampaignsByAccountId operation returns all of the campaigns for the account that you specify in the body of the request message.
Do not confuse the account identifier with the account number. The account number is the system generated account number that is used to identify the account in the Bing Ads web application. The account number has the form xxxxxxxx, where xxxxxxxx is a series of any eight alphanumeric characters. The API uses only the account identifier, never the account number.
Customer Account Identifier
The customer account identifier is the same as the account identifier. You specify the account identifier in the CustomerAccountId SOAP request header element.
As a best practice you should always specify the identifier of the account being accessed in the CustomerAccountId header element. Some of the campaign management operations require that you specify the account ID in the request message, and most of them require that you specify the account ID in the CustomerAccountId header element.
The customer identifier is the numeric identifier that identifies a customer. You specify the customer identifier in the CustomerId SOAP request header element.
As a best practice you should always specify the identifier of the customer that owns the account in the CustomerId header element. Only operations that store data in the customer library for example targets, require you to set the CustomerId header element. Operations that require you to specify the customer ID will state this in the corresponding service operation topic.
Getting Your Account ID and Customer ID
You can also use any one of the following options to get the customer and account identifiers. As a best practice you should store your identifiers locally so that you can access them when needed.
To get a user’s customer ID and account ID, you can sign in to the Bing Ads web application and click on an account within Accounts & Billing. The URL will contain a cid key/value pair in the query string that identifies your customer ID, and an aid key/value pair that identifies your account ID. For example, https://bingads.microsoft.com/cc/Account/Details?cid=1030&aid=49943.
Users with super administrator or aggregator roles can use the Bing Ads web application. To find the customer identifier, click the Accounts & Billing tab, and then view Customer Info within the Details tab. The customer identifier is listed next to Customer ID.
Use the Bing Ads Editor. The customer identifier displays as a tool tip when you move the pointer over the customer’s name.
To programmatically get all of the customer IDs that you have permissions to access, call the GetCustomersInfo operation. To programmatically get all the account IDs that you have permissions to access, call the GetAccountsInfo operation.
Use the GetAccount operation to get an account that the customer owns. Then, access the ParentCustomerId element, which contains the customer identifier.
Aggregator users that call the SignupCustomer operation to sign up new customers can get the new customer’s account ID and customer ID in the response message.