Tableau Connector for Microsoft Ads

Build 23.0.8839

Configuring a Connection

After Installing the Connector you can connect and create a Data Source for data in Microsoft Ads.

Setting Up a Data Source

Complete the following steps to connect to the data:

  1. Under Connect | To a Server, click More....
  2. Select the data source called Microsoft Ads by CData.
  3. Enter the information required for the connection.
  4. Click Sign In.
  5. If necessary, select a Database and Schema to discover what tables and views are available.

Using the Connection Builder

The connector makes the most common connection properties available directly in Tableau. However, it can be difficult to use if you need to use more advanced settings or need to troubleshoot connection issues. The connector includes a separate connection builder that allows you to create and test connections outside of Tableau.

There are two ways to access the connection builder:

  • On Windows, use a shortcut called Connection Builder in the Start menu, under the CData Tableau Connector for Microsoft Ads folder.
  • You can also start the connection builder by going to the driver install directory and running the .jar file in the lib directory.

In the connection builder, you can set values for connection properties and click Test Connection to validate that they work. You can also use the Copy to Clipboard button to save the connection string. This connection string can be given to the Connection String option included in the connector connection window in Tableau.

Connecting to Microsoft Ads

You need to register a Microsoft Ads account, get a developer token, and authenticate using OAuth to connect to the Microsoft Ads APIs.

Register a Bing Ads Account

Complete the following steps to sign up for a Microsoft Ads account and obtain the CustomerId and (optional) AccountId:

  1. Sign up for a Microsoft Ads account in the Bing Ads Web application or at the Sandbox Site for a sandbox account.
  2. Select Settings > Accounts and Billing and select a single account. The AccountId and CustomerId (cid) are displayed on the account's page and in the page's URL.

Get a Developer Token

To use the Microsoft Ads APIs, you must have a DeveloperToken in addition to the CustomerId. You must have the Super Admin role in Microsoft Ads to create a developer token, though you do not need special permissions to use the token.

  1. Log in at the Bing Ads Developer Portal as a Microsoft Account user with the Microsoft Ads Super Admin role.
  2. Click Request Token and take note of your developer token. You will set it in the DeveloperToken connection property.

Authenticating to Microsoft Ads

OAuth

AuthScheme must be set to OAuth in all user account flows.

Desktop Applications

CData provides an embedded OAuth application that simplifies OAuth desktop Authentication. Alternatively, you can create a custom application. See Creating a Custom OAuth App for information on creating custom applications and reasons for doing so.

For authentication, the only difference between the two methods is that you must set two additional connection properties when using custom OAuth applications.

After setting the following connection properties, you are ready to connect:

  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
  • OAuthClientId: (custom applications only) Set to the Client ID in your application settings.
  • OAuthClientSecret: (custom applications only) Set to the Client Secret in your application settings.

When you connect, the connector opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The connector then completes the OAuth process as follows:

  • Extracts the access token from the callback URL.
  • Obtains a new access token when the old one expires.
  • Saves OAuth values in OAuthSettingsLocation so that they persist across connections.

Next Step

See Using the Connector to create data visualizations.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839