Summary
Encountering an error while trying to create a custom connector to fetch data from Microsoft Business Central and sync it to BigQuery. The error is related to the OAuth authentication process.
Question
Hi all,
I am trying to create a custom builder to fetch data from Microsoft Business Central and sync it to BigQuery. Below is the YAML configuration for the custom connector that I am trying to create. When I try to run it, I am encountering an error. Please help me resolve this issue. Thanks!
spec:
type: Spec
connection_specification:
type: object
$schema: http://json-schema.org/draft-07/schema#
required:
- client_id
- client_secret
properties:
client_id:
type: string
order: 0
title: Client ID
airbyte_secret: true
client_secret:
type: string
order: 1
title: Client secret
airbyte_secret: true
additionalProperties: true
type: DeclarativeSource
check:
type: CheckStream
stream_names:
- company
streams:
- name: company
type: DeclarativeStream
retriever:
type: SimpleRetriever
paginator:
type: NoPagination
requester:
path: /companies
type: HttpRequester
url_base: >-
https://api.businesscentral.dynamics.com/v2.0/<tenant_id>/Production/api/v2.0
http_method: GET
authenticator:
type: OAuthAuthenticator
scopes:
- https://api.businesscentral.dynamics.com/.default
client_id: ‘{{ config[’‘client_id’‘] }}’
grant_type: client_credentials
client_secret: ‘{{ config[’‘client_secret’‘] }}’
refresh_request_body: {}
token_refresh_endpoint: >-
https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/token
request_headers: {}
request_body_json: {}
request_parameters: {}
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
partition_router:
primary_key:
schema_loader:
type: InlineSchemaLoader
schema:
type: object
$schema: http://json-schema.org/draft-07/schema#
properties: {}
additionalProperties: true
version: 0.57.0
metadata:
autoImportSchema:
company: true
And the error that I am getting is mentioned below
"url": "<https://login.microsoftonline.com/><token_id>/oauth2/v2.0/token",
"body": "grant_type=client_credentials&client_id=****&client_secret=****&scopes=https%3A%2F%2Fapi.businesscentral.dynamics.com%2F.default",
"headers": {
"User-Agent": "python-requests/2.31.0",
"Accept-Encoding": "gzip, deflate",
"Accept": "*/*",
"Connection": "keep-alive",
"Content-Length": "196",
"Content-Type": "application/x-www-form-urlencoded"
},
"http_method": "POST"
}```
<br>
---
This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C021JANJ6TY/p1723051152208219) if you want
to access the original thread.
[Join the conversation on Slack](https://slack.airbyte.com)
<sub>
["custom-builder", "microsoft-business-central", "bigquery-sync", "oauth-authentication", "error"]
</sub>