Google OAuth for the Microsoft Advertising REST API: is IdentityProvider: Google required, and why did PHP REST SDK 13.0.29 remove Google OAuth?

Toshiyuki Maeda 20 Reputation points
2026-09-10T06:26:39.51+00:00

We are adding Google sign-in support for Microsoft Advertising users in our platform. We use the REST API (v13) exclusively, following the official guides:

  • Register an application (Google OAuth section)
  • Request user consent with Google OAuth
  • Get access and refresh tokens with Google OAuth, which instructs adding the request header IdentityProvider: Google

Three things do not line up, and we would like clarification from the Microsoft Advertising API team.

1. Supported status

Is Google OAuth authentication for the Microsoft Advertising REST API generally available and supported going forward?

2. IdentityProvider header on REST

The REST operation reference pages (for example GetUser) list only Authorization and DeveloperToken headers. Is IdentityProvider: Google required on REST calls? Is it accepted as a plain HTTP header on all services (Customer Management, Campaign Management, Reporting, Bulk) and on the Content API?

Note that SDK versions 13.0.26 to 13.0.28 with GoogleOAuthWebAuthCodeGrant do not send this header at all.

3. PHP REST SDK removal

The BingAds-PHP-REST-SDK v13.0.29 release notes (2026-07-31) say: "Removed deprecated Google OAuth support (google.openid scope and the Google OAuth grant classes)". We confirmed that GoogleOAuthWebAuthCodeGrant and the GOOGLE_OPENID scope constant are no longer present in the v13.0.29 source.

The .NET, Java and Python SDK 13.0.29 notes do not mention this, and the API release notes still list Google login as available since December 2025.

Was this removal specific to the PHP REST SDK, meaning the SDK no longer handles Google token acquisition and applications should obtain Google tokens themselves? Or does it indicate that Google OAuth is being deprecated for the REST API? If Google OAuth is deprecated for REST SDK users, what is the recommended approach?

Our intended integration

Use the Google OAuth 2.0 authorization code flow (scopes openid email profile, access_type=offline, prompt=consent) with our own Google OAuth client, then call the REST API with Authorization: Bearer <google_access_token> plus IdentityProvider: Google, DeveloperToken, CustomerId and CustomerAccountId. Please confirm whether this is the intended integration.

Microsoft Advertising API
Microsoft Advertising API

A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.


Answer accepted by question author
MS Advertising - Vahid 500 Reputation points Microsoft External Staff Moderator
2026-09-10T08:47:29.0033333+00:00

Hello Toshiyuki,

Thank you for using our Microsoft Advertising Learn Q&A Platform! 

Thank you for your query regarding Google OAuth support for the Microsoft Advertising REST API. I understand that you would like clarification on whether IdentityProvider: Google is required and why Google OAuth support was removed from PHP REST SDK version 13.0.29. I hope the response and resources provided here can help you out.

To add Google sign-in support for Microsoft Advertising users in your platform using the REST API (v13), you should follow these steps:

  • Register an Application: First, you need to register your application with Google OAuth. This is essential for obtaining the necessary credentials to authenticate users.
  • Request User Consent: After registering your application, you must request user consent. Redirect the user’s browser to the Google OAuth 2.0 authorization endpoint with the required query parameters. This process ensures that users can authenticate and grant permissions to your application to access their Microsoft Advertising accounts on their behalf. 1
  • Get Access and Refresh Tokens: Once the user grants consent, you will receive an authorization code that you can exchange for access and refresh tokens. When making API calls, include the access token in the request headers along with the IdentityProvider: Google header. This indicates that the authentication is done via Google OAuth. 2 Additionally, ensure to securely store both the access and refresh tokens, as the access token is used for API calls, while the refresh token is used to obtain new access tokens when the current one expires.

For detailed steps, please see the following articles:

Authentication with OAuth - Microsoft Advertising API | Microsoft Learn Get access and refresh tokens - Microsoft Advertising API | Microsoft Learn

Make your first API call - Microsoft Advertising API | Microsoft Learn

Google OAuth authentication for the Microsoft Advertising REST API is generally available and supported going forward. Microsoft Advertising now supports authenticating users with both Microsoft OAuth (Azure identity) and Google OAuth 2.0 as authentication options. This means that you can use Google OAuth for user sign-in alongside the existing Microsoft identity authentication method without any changes to the API request logic. All API requests must still include a valid Microsoft Advertising Developer Token, regardless of the authentication provider used.

Based on the information available in the Microsoft Advertising API documentation, the required headers for API calls include DeveloperToken and AuthenticationToken. While the documentation does not explicitly state that the IdentityProvider: Google header is required for REST calls, it is advisable to include it when using Google OAuth. This practice can help ensure that the authentication method is clearly identified, which may be beneficial across various services such as Customer Management, Campaign Management, Reporting, and Bulk services. Since SDK versions 13.0.26 to 13.0.28 do not send this header, it may not be strictly necessary, but including it could prevent potential issues with service compatibility. Testing API calls with and without this header is recommended to observe any differences in behavior.

No Microsoft Advertising documentation could be identified that definitively confirms whether Google OAuth authentication for the REST API will continue to be supported going forward. The PHP SDK change log you cited shows that its client library has removed the Google OAuth grant classes and related scope constant, but the .NET, Java, and Python SDK release notes, as well as the API release notes, do not mention a deprecation or removal.

Based on the available documentation, it is not possible to determine whether this is a PHP SDK-specific change or part of a broader platform change. If needed, we may be able to raise this matter with our higher-level API engineering team to seek more definitive guidance on whether Google OAuth will continue to be supported for the Microsoft Advertising REST API and whether similar changes are planned for other SDKs.

Our support teams are happy to discuss your account in more detail via phone, chat or email to provide review assistance, please see our support page to reach out! 

I hope the information provided here will at least partly answer your questions.  If you have any additional questions please do not hesitate to reach out to our support. I have also sent you a private message asking for further details. You are more than welcome to respond to me so that I can begin the investigation on my end.

 

Kind regards, 

Vahid | Microsoft Advertising Support Specialist | 800-518-5689

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Newest

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.