# Bing Ads Audience Setup Guide


This guide will help you set up Bing Ads Audience as a destination in the RudderStack dashboard. It also lists the configuration settings required to correctly send data from the supported sources to Bing Ads.

## Connection compatibility

{{< destination-config >}}

## Get started

Once you have confirmed that the source platform supports sending events to Bing Ads Audience, follow these steps:

1. From your [RudderStack dashboard](https://app.rudderstack.com/), add the source. Then, from the list of destinations, select **Bing Ads Audience**.
2. Assign a name to the destination and click **Continue**.

## Connection settings

| Connection settings | Description |
| :-----| :-----|
| Account Settings | Click **Create Account** > **Connect with Bing Ads Audience** and give RudderStack the required permissions to access to your Bing Ads account. |
| Customer Account ID | Enter your Bing Ads account identifier. |
| Customer ID | Enter your Bing Ads customer ID. |
| Audience ID | Enter your Bing Ads audience ID for which you want to sync the data. <br /><br />{{< info >}}See [FAQ](#faq) for more information on obtaining the required credentials.{{< /info >}} |
| Hash Email | This setting is on by default and hash-encrypts the email present in your event. <br /><br />{{< warning >}}Make sure to turn off this setting if you are already sending a hashed email in your event.{{< /warning >}} |

## FAQ

#### Where can I find my Bing Ads customer ID and customer account ID?

To get your Bing Ads customer ID and account ID, sign in to your Microsoft Advertising web app and click the **Campaigns** tab. The URL contains a `cid` key/value pair in the query string that contains the customer ID and an `aid` key/value pair that identifies your account ID.

A sample URL is shown:

```
https://ui.ads.microsoft.com/campaign/Campaigns.m?cid=<CUSTOMER_ID>&aid=
<ACCOUNT_ID>#/customer/<CUSTOMER_ID>/account/<ACCOUNT_ID>/campaign.
```

#### Where can I find the Bing Ads audience ID?

To get your Bing Ads audience, go to **Tools** > **Audiences**. 

{{< image src="images/event-stream-destinations/audiences-option.webp" alt="Audiences option" >}}

You will see the list of audiences with their corresponding **Audience ID**.

{{< image src="images/event-stream-destinations/bingads-audience-id.webp" alt="Audience ID" >}}

#### How to create an audience in Bing Ads?

1. Go to **Tools** > **Audiences**.

{{< image src="images/event-stream-destinations/bingads-2.webp" alt="Create BingAds audience" >}}

2. Click **Create** to create the new audience.

{{< image src="images/event-stream-destinations/bingads-3.webp" alt="Create BingAds audience" >}}

3. Name the audience, select **Customer match list** as the audience type and click **Next**.

{{< image src="images/event-stream-destinations/bingads-4.webp" alt="Create BingAds audience" >}}

4. Choose **hashed file**, download a specimen template and upload the same by clicking on **Browse**.

{{< image src="images/event-stream-destinations/bingads-5.webp" alt="Create BingAds audience" >}}

5. Accept the terms and conditions, choose membership duration as **No expiration** and sharing field according to your access levels.

{{< image src="images/event-stream-destinations/bingads-6.webp" alt="Create BingAds audience" >}}

6. Finally, click **Apply changes** to create the audience successfully.

{{< image src="images/event-stream-destinations/bingads-7.webp" alt="Create BingAds audience" >}}

#### Why am I getting the "AADSTS650052" error when authenticating to Microsoft Advertising?

If you encounter the following error while authenticating to Microsoft Advertising:

```text
Error Code: AADSTS650052
Error Message: "The app is trying to access a service that your organization lacks a service principal for."
```

This issue commonly occurs when you sign in using a work or school account that belongs to an Azure AD-managed domain. Organizational accounts may have restrictions that prevent RudderStack from completing the authentication.

To resolve this issue, consider using a personal Microsoft account, for example, emails having `@outlook.com`, `@hotmail.com`, or `@live.com` domains.

<br />
