Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Bing Ads: change account id field name #9972

Closed
Tracked by #12238
joepbuhre opened this issue Feb 1, 2022 · 2 comments · Fixed by #12937
Closed
Tracked by #12238

Source Bing Ads: change account id field name #9972

joepbuhre opened this issue Feb 1, 2022 · 2 comments · Fixed by #12937

Comments

@joepbuhre
Copy link

I tried to setup the Bing Ads connector as source. However following the exact steps I got the following error: "Exception(\"You don't have accounts assigned to this user.\")" .

So I followed the whole setup again step by step and Airbyte requested an Account ID from me. When I went to the docs Microsoft said:

The URL will contain a cid key/value pair in the query string that identifies your customer ID, and an aid key/value pair that identifies your account ID.

So I thought the Account Id was the aid key/value pair. However: when I inserted it in Airbyte it the gave above error. Well, cue 3 hours later. I thought let's have a look at the JSON request/response of airbyte. And then I saw the following JSON.

{
   "sourceDefinitionId":"xxxxxx-xxxxxxx-xxxxxx-xxxxxx",
   "connectionConfiguration":{
      "reports_start_date":"2020-01-01",
      "monthly_reports":false,
      "developer_token":"xxxxxxxxxxxxxxxx",
      "weekly_reports":false,
      "hourly_reports":false,
      "refresh_token": "xxx....xxxxxxx",
      "daily_reports":true,
      "client_secret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "customer_id":"xxxxxxx",
      "client_id":"xxxxxx-xxxxxx-xxxxxx-xxxxxx",
      "accounts":{
         "selection_strategy":"all"
      },
      "user_id":"12345678"
   }
}

So I found out that the field that in Airbyte, which is called Account Id, was send as user_id . On top of that, in the source of the Bing Ads connector I found the following:

.

So I dove into it further, and checked the url which microsoft provided. I found three values: cid, aid and uid
https://ads.microsoft.com/cc/Users?cid=12345678&aid=12345678&uid=12345678987 .
Well, what are the chances that this is the user_id that is being send over JSON. I swapped out the values and BAM, miracle happened. It worked!

So I forked the repo and tried to change the value, but I couldn't test it. So I did my best to document the problem and point you all in the right direction.

TLDR
Account Id in the Bing ads connector should be called User Id. The file/line where it should be changed is


&&
"description": "Bing Ads Account ID. You can find Account ID by going to your profile and selecting Accounts and Billing."
.

Account Id should be changed to User Id

@joepbuhre joepbuhre added area/documentation Improvements or additions to documentation type/enhancement New feature or request labels Feb 1, 2022
@alafanechere alafanechere changed the title Change Fields in Bing Ads Source Bing Ads: change account id field name Feb 1, 2022
@misteryeo misteryeo added type/bug Something isn't working connectors/sources-api and removed type/enhancement New feature or request labels Apr 19, 2022
@itaseskii
Copy link
Contributor

I'll claim this issue.

@aharelick aharelick moved this to In Progress in Community Contributors Apr 27, 2022
@aharelick aharelick assigned itaseskii and unassigned itaseskii Apr 27, 2022
@aharelick
Copy link

This issue will be handled by an internal team, I'm removing it from the Maintainer program.

@bazarnov bazarnov moved this to Implementation in progress in GL Roadmap May 13, 2022
@bazarnov bazarnov self-assigned this May 13, 2022
@bazarnov bazarnov moved this from Implementation in progress to In review (internal) in GL Roadmap May 17, 2022
@midavadim midavadim moved this from In review (internal) to Done in GL Roadmap Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
8 participants