## TL;DR

Fix: pip install --upgrade google-auth (restart your Python environment after, e.g. dbutils.library.restartPython() on Databricks).

## Steps

1. What was reported:
Issue googleapis/google-cloud-python#12254 (closed, 23 comments): I am experiencing an error with a Python script that has been working well since 2023. The script's main function is to extract sessions from Google Analytics 4 via the package google-analytics-data. However, after 7:30 AM PST on February 1, 2024, I received an error message stating that the 'Credentials' object has no attribute 'universe_domain'. 'universe_domain' is one of the attributes in the API key JSON file.

2. My script followed the guidance provided by Google in this link https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries (I copied the...

3. What works:
'Credentials' object has no attribute 'universe_domain' from google-analytics-data (or similar Google Cloud Python libs) is a stale google-auth problem. Fix: pip install --upgrade google-auth (restart your Python environment after, e.g. dbutils.library.restartPython() on Databricks). The reporter confirmed this cleared it.

## When to use

You are seeing this: What was reported: Issue googleapis/google-cloud-python#12254 (closed, 23 comments): I am experiencing an error with a Python script that has been working well since 2023. Use this skill when you run into "'Credentials' object has no attribute 'universe_domain' in package google-analytics-data URI".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Sources

- https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries
