Cmdlets for Microsoft Ads

Build 24.0.9060

Creating a Custom OAuth App

When to Create a Custom OAuth App

CData embeds OAuth Application Credentials with CData branding that can be used when connecting via either a Desktop Application or from a Headless Machine. Creating a custom OAuth application is, however, required when using a web application.

You may choose to create your own OAuth Application Credentials when you want to

  • control branding of the Authentication Dialog
  • control the redirect URI that the application redirects the user to after the user authenticates
  • customize the permissions that you are requesting from the user

Follow the steps below to create a custom OAuth app and obtain the connection properties in a specific OAuth authentication flow.

Create a Custom OAuth App

You can create a custom OAuth application for desktop applications, web applications, and headless machines. The steps are identical except for how the Redirect URI is defined.

Desktop Applications

Follow these steps:
  1. If you have not done so already, sign up for a Bing Ads account in the Bing Ads Web application or at the Sandbox Site for a sandbox account.
  2. Go to the Azure portal (Azure test portal for sandbox accounts), and login with your Microsoft Account credentials when prompted.
  3. Under Azure Active Directory > App registrations, click New registration.
  4. Provide the application name and select an appropriate Supported account type. If you do not choose to allow personal Microsoft accounts, users with personal accounts are prevented from authenticating.
  5. How Re In the Redirect URI section, you must set an appropriate URL. For desktop applications a value such as http://localhost:33333 or another port of your choice may be set.
  6. Register your application and take note of your Application (client) Id. You will use it as the OAuthClientId value in the OAuth grant flow.
  7. In the Certificates & secrets section, click New client secret to generate a client secret and take note of the resulting value. You will use it as the OAuthClientSecret value.

Headless Machines

  1. If you have not done so already, sign up for a Bing Ads account in the Bing Ads Web application or at the Sandbox Site for a sandbox account.
  2. Go to the Azure portal (Azure test portal for sandbox accounts), and login with your Microsoft Account credentials when prompted.
  3. Under Azure Active Directory > App registrations, click New registration.
  4. Provide the application name and select an appropriate Supported account type. If you do not choose to allow personal Microsoft accounts, users with personal accounts are prevented from authenticating.
  5. In the Redirect URI section, you must set an appropriate URL. For desktop applications a value such as http://localhost:33333 or another port of your choice may be set.
  6. Register your application and take note of your Application (client) Id. You will use it as the OAuthClientId value in the OAuth grant flow.
  7. In the Certificates & secrets section, click New client secret to generate a client secret and take note of the resulting value. You will use it as the OAuthClientSecret value.

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