question

JessicaOcto-1426 avatar image
0 Votes"
JessicaOcto-1426 asked JessicaOcto-1426 commented

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

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://docs.microsoft.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.

advertising-api
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JessicaOcto-1426 - Sorry for the delay. This sounds related to an issue we found in April and has since been resolved. If you still observe unexpected results please share the sample response with timestamp. Here is fine if not sensitive, otherwise please contact support.


1 Vote 1 ·

Hi Eric,

Thank you for your response. No problem at all. We only had to do a small investigation last month, figure out an alternative way of making queries, deploy a new release, and send emails to our customers to update them on our progress, which they did appreciate. No client complaints since then. So, all good.

Have a great day!

0 Votes 0 ·

0 Answers