> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Bing Ads (Microsoft Ads) with OAuth 2.0 – StackOne Hub

> Link a Bing Ads (Microsoft Ads) account in the StackOne Hub using OAuth 2.0. End-user guide to authorize the integration and start using Bing Ads (Microsoft Ads) actions.

<Warning>You need Super Admin access to the Microsoft Advertising account to request or view a developer token. Keep the developer token secure and do not share it.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Retrieve your Developer Token</h2>

  <p>The developer token is sent as the <strong>DeveloperToken</strong> header on every Microsoft Advertising API request.</p>

  <Steps>
    <Step title="Open Developer settings">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Sign in to <a href="https://ui.ads.microsoft.com" target="_blank" rel="noopener noreferrer">Microsoft Advertising</a>, open <strong>Settings</strong> in the left rail, and select <strong>Developer settings</strong>.</p>

        <ul>
          <li>You must be signed in as a <strong>Super Admin</strong> of the Microsoft Advertising account to request or view the developer token.</li>
        </ul>
      </div>
    </Step>

    <Step title="Request a developer token (first time)">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>On the <strong>Developer settings</strong> page, choose the account under <strong>Select user</strong>. If you do not have a token yet, review the <strong>Microsoft Developer Services Agreement</strong> and click <strong>Request Developer Token</strong>.</p>

        <img src="https://mintcdn.com/stackone-60/4cMWTegrJozhojrD/connectors/bingads/images/oauth2-config-request-developer-token.png?fit=max&auto=format&n=4cMWTegrJozhojrD&q=85&s=4e2e98c3e26ef2d0a10ccc87f95d3216" alt="Microsoft Advertising Developer settings page with the Request Developer Token button highlighted (shown when no token exists yet)" width="2000" height="877" data-path="connectors/bingads/images/oauth2-config-request-developer-token.png" />
      </div>
    </Step>

    <Step title="Copy your developer token">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Once a token has been issued, it is shown under <strong>Developer token</strong> on the same <strong>Developer settings</strong> page. Copy it and paste it into the <strong>Developer Token</strong> field in StackOne Hub.</p>

        <img src="https://mintcdn.com/stackone-60/4cMWTegrJozhojrD/connectors/bingads/images/oauth2-config-developer-token.png?fit=max&auto=format&n=4cMWTegrJozhojrD&q=85&s=a7ada7e44407d9e228ace75640d8943a" alt="Microsoft Advertising Developer settings page with the issued Developer token value highlighted (redacted)" width="1280" height="800" data-path="connectors/bingads/images/oauth2-config-developer-token.png" />
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Find your Customer ID and Account ID</h2>

  <p>The <strong>Customer ID</strong> identifies the manager (customer) account and is sent as the <strong>CustomerId</strong> header. The <strong>Account ID</strong> identifies the ad account being managed and is sent as the <strong>CustomerAccountId</strong> header. Both appear in the Microsoft Advertising web UI URL.</p>

  <Steps>
    <Step title="Copy the IDs from the URL query string">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Sign in to the <a href="https://ui.ads.microsoft.com" target="_blank" rel="noopener noreferrer">Microsoft Advertising web UI</a>, open the account you want to manage, and look at the browser address bar. The URL query string contains both IDs.</p>

        <ul>
          <li>`cid=` is your <strong>Customer ID</strong> — enter it in the <strong>Customer ID</strong> field in StackOne Hub.</li>
          <li>`aid=` is your <strong>Account ID</strong> — enter it in the <strong>Account ID</strong> field in StackOne Hub.</li>
          <li>Format: `https://ui.ads.microsoft.com/campaign/vnext/...?cid={customerId}&aid={accountId}`</li>
          <li>Example: `https://ui.ads.microsoft.com/campaign/vnext/overview?cid=251243063&aid=141534522`</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<div data-whitelabel-hide>
  <h2>Linking the Account from the Hub</h2>

  <Steps>
    <Step title="Navigate to the Hub">
      Use one of the three <a href="/guides/accounts-section#linking-accounts">Linking Account Methods</a> to access the Hub.
    </Step>

    <Step title="Fill out the fields">
      Fill out the following fields using details from your provider:

      <ul>
        <li><strong>Developer Token</strong></li>
        <li><strong>Customer ID</strong></li>
        <li><strong>Account ID</strong></li>
      </ul>
    </Step>

    <Step title="Connect">
      <ul>
        <li>Click <strong>Connect</strong></li>
        <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
        <li>Once authorization is successful, you will see a confirmation popup</li>
      </ul>
    </Step>
  </Steps>

  <p>If the account linking is successful, you will see the newly linked account in your <a href="/guides/accounts-section">Accounts</a> page.</p>
</div>
