Issue setting up source using Bing Ads connector 0.1.15

  • Is this your first time deploying Airbyte?: Yes
  • OS Version / Instance: Ubuntu, GCP VM (linux)
  • Memory / Disk: 4Gb / 250 Gb
  • Deployment: Docker Compose
  • Airbyte Version: 0.40.15
  • Source name/version: Bing Ads / 0.1.15
  • Destination name/version: N/A
  • Step: creating a new source in the Airbyte UI
  • Description:

Hi

I’m trying to add Bing Ads as a source and I run into a weird set of errors.

When I try to setup the source in AirByte with:

1/ ‘common’ as tenant ID and no client secret, I get the following error message when clicking on setup source:
The connection tests failed.
Internal Server Error: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Secret Payload cannot be empty.

I’m not sure if this is an Airbyte bug: the client secret seems included in the payload even though it’s not provided. Could you please confirm?

2/ ‘common’ as tenant ID and my Client secret, I get the following error message when clicking on setup source:
OAuthTokenRequestException(‘invalid_request’, “AADSTS90023: Public clients can’t send a client secret.\r\nTrace ID: 39355392-3153-465d-b6f8-8fb7681f0c00\r\nCorrelation ID: fec62f59-2376-4ac6-ab09-9641ceaee8cf\r\nTimestamp: 2022-11-01 13:52:23Z”)

This seems to suggest that apps using the ‘common’ client are treated as public and can’t provide a secret.

3/ When I try to generate a refresh token using my tenant ID I get an error during the OAuth process:
Message: AADSTS50020: User account ‘xxx@xxx.com’ from identity provider ‘live.com’ does not exist in tenant ‘Microsoft Services’ and cannot access the application ‘XXX’(xxx) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.

This seems to that in our use case we can’t use a tenant id.

I’m not too sure what to do here. Could you please advise?

Hey @RandomAirByteUser, thanks for writing out all the details in such a clear way. I’m looking into this, but think that Microsoft’s roll out of multi-factor authentication for third party apps using the API might be affecting this.
https://learn.microsoft.com/en-us/advertising/guides/authentication-oauth-get-tokens?view=bingads-13

Let me look into this more and I’ll get back to you soon!

Update: I managed to find a solution using 2:
The issue was that I used the wrong flow to generate the refresh token. I used the BingAds java desktop quickstart (to same time) but according to this desktop apps are “Public clients” in Microsoft jargon: Error: Public clients can't send a client secret while try to get access token in Onedrive - Stack Overflow
I changed to the webservice auth flow and now it works (though what Microsoft calls a quickstart is not really: their doc doesn’t use the right version of the SDK so the token generated doesn’t work with Airbyte)

That is wonderful to hear, thanks so much for the detailed update!