Problem getting Bing Ads client token during OAuth (GetUser method fails)

Jessica Octo 1 Reputation point
2021-04-11T22:26:27.413+00:00

We have built an app that integrated with the Bing Ads service (read-only access only).

Since March this year, we started getting intermittent issues when trying to get a user access token. We use OAuth to authorize our app. Our app is registered on portal.azure.com since 2018. During OAuth, we use Microsoft Identity Platform endpoint with the following scope: https://ads.microsoft.com/ads.manage offline_access

Since the end of last month, we are experiencing difficulties authorizing our app and accessing clients’ Bing Ads accounts. There have been no changes in our app or interfaces for many months.

During the OAuth process, after successful user authentication (the user enters his or her login details and allows our app to connect to the Bing Ads account), the user closes the OAuth popup and we are trying to get a refresh token.

We invoke Customer ManagementService’s GetUser method (https://video2.skills-academy.com/en-us/advertising/customer-management-service/getuser?view=bingads-13)

Here is our SOAP request:

<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/Customer/v13">
<Action mustUnderstand="1">GetUser</Action>
<AuthenticationToken i:nil="false">${accessToken}</AuthenticationToken>
<DeveloperToken i:nil="false">{developerToken}</DeveloperToken>
</s:Header>
<s:Body>
<GetUserRequest xmlns="https://bingads.microsoft.com/Customer/v13">
<UserId i:nil="true"/>
</GetUserRequest>
</s:Body>
</s:Envelope>

In response, we:

Sometimes get the right SOAP response (which is great)
Sometimes we get an internal error back with code 500
Sometimes we get a 100KB long XML file with the list of all available methods and no user data

It behaves as if there is an infrastructure issue since there is no consistency in the responses that we get when we call GetUser method.

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.
402 questions
{count} votes