Error connecting to GA4 account with 'Configuration check failed' message

Summary

The user is facing an error while trying to connect to a GA4 account, specifically getting a ‘Configuration check failed’ message. The error indicates access denial to the property ID entered. User is advised to check their access to the Property ID or use Google Analytics to find the correct Property ID.


Question

Hello, im trying to connect to a GA4 account but am getting the following error, even though ive added all information correctly and have enabled the APIs as well. Configuration check failed
Access was denied to the property ID entered. Check your access to the Property ID or use Google Analytics https://developers.google.com/analytics/devguides/reporting/data/v1/property-id#what_is_my_property_id to find your Property ID.

Any help please? Thanks!



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want to access the original thread.

Join the conversation on Slack

["error", "ga4-account", "configuration-check-failed", "google-analytics", "property-id"]

I’m assuming you’re using Airbyte OSS.

First thing to check, is the property ID all numeric? (note this is NOT the G-###### stream ID you’re tracking on the site)

Are you using a Service account to authenticate, and if so are those APIs enabled in the same project as the service account exists in?

Also, are you pasting the JSON key in directing into the Service Account JSON Key field?

If it still isn’t working, I would try taking the JSON key to a single line before pasting it in, as I’ve had one case where it didn’t like my pasting the full file.

have tried all of the above and just tried making it all a single line as well. Giving the same error, could it be some permission issues? I have followed the instruction and have set the service account to viewer. Not sure what else is required or if im missing something. Here’s the log file for the error if that would help further:

2024-05-07 09:17:38 [46mplatform[0m > Docker volume job log path: /tmp/workspace/f2c54d64-8da8-4dfd-a1d0-b296ead56fcc/0/logs.log
2024-05-07 09:17:38 [46mplatform[0m > Executing worker wrapper. Airbyte version: 0.58.1
2024-05-07 09:17:38 [46mplatform[0m > Attempt 0 to save workflow id for cancellation
2024-05-07 09:17:38 [46mplatform[0m > Using default value for environment variable SIDECAR_KUBE_CPU_LIMIT: ‘2.0’
2024-05-07 09:17:38 [46mplatform[0m > Using default value for environment variable SOCAT_KUBE_CPU_LIMIT: ‘2.0’
2024-05-07 09:17:38 [46mplatform[0m > Using default value for environment variable SIDECAR_KUBE_CPU_REQUEST: ‘0.1’
2024-05-07 09:17:38 [46mplatform[0m > Using default value for environment variable SOCAT_KUBE_CPU_REQUEST: ‘0.1’
2024-05-07 09:17:38 [46mplatform[0m >
2024-05-07 09:17:38 [46mplatform[0m > ----- START CHECK -----
2024-05-07 09:17:38 [46mplatform[0m >
2024-05-07 09:17:38 [46mplatform[0m > Checking if airbyte/source-google-analytics-data-api:2.4.2 exists…
2024-05-07 09:17:38 [46mplatform[0m > Creating docker container = source-google-analytics-data-api-check-f2c54d64-8da8-4dfd-a1d0-b296ead56fcc-0-xtyzy with resources io.airbyte.config.ResourceRequirements@2f93775c[cpuRequest=,cpuLimit=,memoryRequest=,memoryLimit=,additionalProperties={}] and allowedHosts null
2024-05-07 09:17:38 [46mplatform[0m > airbyte/source-google-analytics-data-api:2.4.2 was found locally.
2024-05-07 09:17:38 [46mplatform[0m > Preparing command: docker run --rm --init -i -w /data/f2c54d64-8da8-4dfd-a1d0-b296ead56fcc/0 --log-driver none --name source-google-analytics-data-api-check-f2c54d64-8da8-4dfd-a1d0-b296ead56fcc-0-xtyzy --network host -v airbyte_workspace:/data -v oss_local_root:/local -e DEPLOYMENT_MODE=OSS -e WORKER_CONNECTOR_IMAGE=airbyte/source-google-analytics-data-api:2.4.2 -e AUTO_DETECT_SCHEMA=true -e LAUNCHDARKLY_KEY= -e SOCAT_KUBE_CPU_REQUEST=0.1 -e SOCAT_KUBE_CPU_LIMIT=2.0 -e FIELD_SELECTION_WORKSPACES= -e USE_STREAM_CAPABLE_STATE=true -e AIRBYTE_ROLE=dev -e WORKER_ENVIRONMENT=DOCKER -e APPLY_FIELD_SELECTION=false -e WORKER_JOB_ATTEMPT=0 -e OTEL_COLLECTOR_ENDPOINT=http://host.docker.internal:4317 -e FEATURE_FLAG_CLIENT=config -e AIRBYTE_VERSION=0.58.1 -e WORKER_JOB_ID=f2c54d64-8da8-4dfd-a1d0-b296ead56fcc airbyte/source-google-analytics-data-api:2.4.2 check --config source_config.json
2024-05-07 09:17:38 [46mplatform[0m > Reading messages from protocol version 0.2.0
2024-05-07 09:17:49 [46mplatform[0m > {
“error”: {
“code”: 403,
“message”: “User does not have sufficient permissions for this property. To learn more about Property ID, see https://developers.google.com/analytics/devguides/reporting/data/v1/property-id.”,
“status”: “PERMISSION_DENIED”
}
}

2024-05-07 09:17:49 [46mplatform[0m > Incorrect Property ID: 283071105
Traceback (most recent call last):
File “/airbyte/integration_code/source_google_analytics_data_api/source.py”, line 518, in check_connection
metadata = next(stream.read_records(sync_mode=SyncMode.full_refresh), None)
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/streams/http/http.py”, line 482, in read_records
yield from self._read_pages(
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/streams/http/http.py”, line 498, in _read_pages
request, response = self._fetch_next_page(stream_slice, stream_state, next_page_token)
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/streams/http/http.py”, line 524, in _fetch_next_page
response = self._send_request(request, request_kwargs)
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/streams/http/http.py”, line 422, in _send_request
return backoff_handler(user_backoff_handler)(request, request_kwargs)
File “/usr/local/lib/python3.9/site-packages/backoff/_sync.py”, line 105, in retry
ret = target(*args, **kwargs)
File “/usr/local/lib/python3.9/site-packages/backoff/_sync.py”, line 105, in retry
ret = target(*args, **kwargs)
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/streams/http/http.py”, line 381, in _send
raise exc
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/streams/http/http.py”, line 378, in _send
response.raise_for_status()
File “/usr/local/lib/python3.9/site-packages/requests/models.py”, line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://analyticsdata.googleapis.com/v1beta/properties/283071105/metadata

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/airbyte/integration_code/main.py”, line 8, in <module>
run()
File “/airbyte/integration_code/source_google_analytics_data_api/run.py”, line 18, in run
launch(source, sys.argv[1:])
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py”, line 234, in launch
for message in source_entrypoint.run(parsed_args):
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py”, line 115, in run
yield from map(AirbyteEntrypoint.airbyte_message_to_string, self.check(source_spec, config))
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py”, line 139, in check
check_result = self.source.check(self.logger, config)
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py”, line 87, in check
check_succeeded, error = self.check_connection(logger, config)
File “/airbyte/integration_code/source_google_analytics_data_api/source.py”, line 531, in check_connection
raise wrong_property_id_error
airbyte_cdk.utils.traced_exception.AirbyteTracedException: Incorrect Property ID: 283071105
2024-05-07 09:17:49 [46mplatform[0m > Check connection job subprocess finished with exit code 1
2024-05-07 09:17:49 [46mplatform[0m >
2024-05-07 09:17:49 [46mplatform[0m > ----- END CHECK -----
2024-05-07 09:17:49 [46mplatform[0m >

Grateful for your help!

When you add the service account to the GA4 user permissions, is it in the format <mailto:service-account-name@project-name.iam.gserviceaccount.com|service-account-name@project-name.iam.gserviceaccount.com>? And is it being added at the project or account level in GA4?

Also, what versions of Airbyte and the GA4 connector are you on?

Yup it is in that format, its being added at the account level as instructed in the Airbyte documentation. Also, im using Airbyte Open Source

What version of Airbyte OSS? (you can find this by clicking Help in the bottom left corner, it’ll be at the bottom of the little menu that opens)

And what version of the connector? You can find this under Settings > Sources and then finding your source and looking at the “Default Version” collumn