Microsoft Advertising API access: developer token, Entra app, publisher verification

Three gates, owned by three different parts of Microsoft. The token is a button. The app registration is ten minutes. Publisher verification is where the weeks go.

Start free →

Made with Hermoso

Microsoft's own getting started page makes it sound simple: "Any Microsoft Advertising user with a developer token can begin using the Bing Ads API." For a script on your own account, that is close to true. For a tool other companies sign into, you need three separate things, and the third one is the slow one.

What you are applying for

Every Microsoft Advertising call carries three credentials at once:

CredentialWhere it comes fromHeader
Developer tokenMicrosoft Advertising, Developer SettingsDeveloperToken
User access tokenOAuth through your Microsoft Entra appAuthenticationToken or a Bearer header
Which accountThe user's customer and accountCustomerId and CustomerAccountId

If other businesses will connect, your Entra app is multitenant, and a multitenant app needs publisher verification before most users can consent to it.

Before you apply

  • A Microsoft Advertising account and a Super Admin user. Only Super Admin credentials can request the production token.
  • A work or school account in a Microsoft Entra tenant. Microsoft: "You can no longer log in using a personal Microsoft account" when registering the app.
  • For publisher verification: a verified Microsoft AI Cloud Partner Program account (the partner global account, not a location ID), an Entra tenant associated with it, a publisher domain on the app that is not *.onmicrosoft.com, an email domain that matches it, multifactor authentication, and one person who is Application Administrator or Cloud Application Administrator in Entra and CPP Partner Admin or Account Admin in Partner Center.

Step by step

  1. Start in sandbox. Sandbox and production use separate credentials. "Everyone can use the universal sandbox developer token i.e., BBD37VB98."
  2. Request the production token. Sign in with Super Admin credentials to Developer Settings in Microsoft Advertising, choose the user to associate, and click Request Token. One universal token serves every user of your application. It grants no extra permissions: users reach only the accounts their own role allows.
  3. Register the app in Entra. App registrations, New registration. Microsoft's instructions for Supported account types say: select "Any Entra ID Tenant + Personal Microsoft accounts". Add a web redirect URI, create a client secret under Certificates and secrets, and copy its value before you leave the page.
  4. Request consent for the msads.manage scope, then exchange the code for access and refresh tokens.
  5. Find the accounts. Call GetUser with a nil UserId, then SearchAccounts to get the customer and account IDs for the signed-in user.
  6. Verify the publisher. Complete Partner Center verification, then enter your Partner One ID on the app registration under Branding and properties. The Partner Center approval does nothing to your consent screen until the ID is on the app.

Where applications fail

  • Unverified multitenant apps lose consent. Microsoft: "users can't consent to most newly registered multitenant apps that aren't publisher verified" when risk-based step-up consent is on, for apps registered after November 8, 2020 that ask for more than basic sign-in. Azure shows the same rule on the app itself: "End users cannot grant consent to newly registered multitenant apps without verified publishers."
  • Partner Center labels mislead. A step that reads "Pending Partner Action" can mean your document is submitted and waiting on Microsoft. Open the Resolve panel and read the document state there. Document submission allows 3 attempts, so read Resolve before you upload again.
  • Error 105 is often the wrong environment. A sandbox token against production, or the reverse, comes back looking like bad credentials. Error 106 means the user cannot reach that account, so the CustomerId and CustomerAccountId pair is wrong.
  • HTTP 200 is not success. Microsoft says it "doesn't support 'all or nothing' error handling behavior." Failures arrive inside PartialErrors and NestedPartialErrors on a 200, so read them on every write.
  • Admin consent walls. AADSTS65001 means no consent on record, AADSTS90094 means an administrator has to consent for the tenant, and AADSTS650052 means the Microsoft Advertising service principal is missing from the user's tenant.
  • Status words differ from Google. Objects are Active or Paused. Deleted is documented "for internal use only".

How long it takes

The developer token is a request on a settings page, and the docs describe no review for it. The Entra registration takes minutes. Publisher verification is the long pole: Microsoft says developers who already meet the requirements "can be verified in minutes", but getting the Partner Center account itself verified means email, identity, employment and business checks, and Microsoft's own panel says a submitted document is reviewed "within 5 days". With one rejection along the way, ours took about three weeks.

Skip it: connect to Hermoso

Hermoso holds a production developer token and a publisher-verified multitenant Entra app. You sign in with Microsoft, consent once, choose the ad accounts this brand can use, and manage campaigns, ad groups, ads, keywords, audiences and reports from the web app, the CLI or any agent over MCP.

  • Everything is created Paused. Activating needs an explicit confirm, and so does creating an active child under an active parent.
  • Every write reads PartialErrors and fails loudly instead of reporting a 200 as success, then reads the tree back.
  • Errors keep Microsoft's own words and TrackingId, explain 105 and 106, and separate a bad ID in the request from a billing problem on your account.

See Microsoft Ads MCP and Microsoft Ads on Hermoso. Related: Google Ads API access levels, LinkedIn Advertising API access.

Sources

  • https://learn.microsoft.com/en-us/advertising/guides/get-started?view=bingads-13
  • https://learn.microsoft.com/en-us/advertising/guides/authentication-oauth-register?view=bingads-13
  • https://learn.microsoft.com/en-us/entra/identity-platform/publisher-verification-overview

Frequently asked questions

How do I get a Microsoft Advertising developer token?

Sign in with Super Admin credentials to Developer Settings in Microsoft Advertising, choose the user to associate with the token, and click Request Token. One universal token serves every user of your app.

Is there a sandbox developer token for Microsoft Advertising?

Yes. Microsoft publishes the universal sandbox developer token BBD37VB98. Sandbox and production use separate accounts and credentials.

Do I need publisher verification for the Microsoft Advertising API?

For a multitenant app that other companies sign into, yes in practice. Microsoft blocks user consent to most newly registered multitenant apps that are not publisher verified when risk-based step-up consent is on.

What does Microsoft Advertising error 105 mean?

It commonly signals an environment mismatch, such as a sandbox developer token used against production. Error 106 means the user cannot access the requested customer or account.

Why does a Microsoft Advertising write return 200 but nothing changed?

Microsoft does not support all-or-nothing writes. Failures come back inside PartialErrors or NestedPartialErrors on an HTTP 200, so check them on every response.

Skip the app reviews: connect your accounts free, no card.

Start free →   See pricing