Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
eclarkeMSI
Frequent Visitor

Google Analytics GA4 Authentication Error

Is anyone else getting this error when trying to configure/authenticate google analytics data source in order to enable data refresh?

Failed to update data source credentials: We found an unexpected character in the JSON input

1 ACCEPTED SOLUTION
SanderTK
Advocate II
Advocate II

We have gotten it to work again but I am not exactly sure how.

My thought process was that since we still have a Fabric trial, we could use a Dataflow 2 to connect to the Google Analytics data and sink it to our already existing data warehouse. From there we can connect our semantic model to the data warehouse exclusively.

 

The dataflow actually works the same way we connect to GA through PowerBI desktop. We can also set a refresh schedule on it.

 

What has happened is that by setting this up, PowerBI Service created another Google Analytics gateway (with the name "Google Analytics - [user that set up the dataflow]"). I believe this gateway does actually work and the other connection in the semantic model straight to GA might connect through that gateway as well because our semantic model connecting to GA directly now also refreshes again.

 

I do not want to break anything so I have not tried to reconnect to the datasource credentials in the semantic model and instead just let it refresh succesfully like it did before. I will also keep the Dataflow in tact in case deleting that will delete the gateway with it.

 

Conclusion: if you have the option of creating a dataflow, connect that to your GA source and that process alone should already create a new GA gateway that could very well solve your initial connection problem (even if it's temporary, while MS is working on a fix). It does then not matter what sink you use for that GA data in the dataflow since you don't need to functionally use the dataflow actions itself.

 

Hope this helps in some way and if you do have any questions regarding the set up, don't hesitate to ask.

View solution in original post

12 REPLIES 12
kletterbilder
Helper I
Helper I

Hi,

we have the same issue. Is there anybody who solved it? Did somebody raise a ticket to Microsoft? The solution for this ticket, did not help us. If you create a new report with GA4 connections an old report will not help us.

SanderTK
Advocate II
Advocate II

We have gotten it to work again but I am not exactly sure how.

My thought process was that since we still have a Fabric trial, we could use a Dataflow 2 to connect to the Google Analytics data and sink it to our already existing data warehouse. From there we can connect our semantic model to the data warehouse exclusively.

 

The dataflow actually works the same way we connect to GA through PowerBI desktop. We can also set a refresh schedule on it.

 

What has happened is that by setting this up, PowerBI Service created another Google Analytics gateway (with the name "Google Analytics - [user that set up the dataflow]"). I believe this gateway does actually work and the other connection in the semantic model straight to GA might connect through that gateway as well because our semantic model connecting to GA directly now also refreshes again.

 

I do not want to break anything so I have not tried to reconnect to the datasource credentials in the semantic model and instead just let it refresh succesfully like it did before. I will also keep the Dataflow in tact in case deleting that will delete the gateway with it.

 

Conclusion: if you have the option of creating a dataflow, connect that to your GA source and that process alone should already create a new GA gateway that could very well solve your initial connection problem (even if it's temporary, while MS is working on a fix). It does then not matter what sink you use for that GA data in the dataflow since you don't need to functionally use the dataflow actions itself.

 

Hope this helps in some way and if you do have any questions regarding the set up, don't hesitate to ask.

KaterinaB
Helper I
Helper I

Same issue here. It happened after changing settings after not touching them since 2023, until today all worked fine. Did any of you have any luck opening Microsoft ticket? 

mfinlay
Advocate II
Advocate II

We're having the exact same issue, meaning our only option is to manually refresh a report in Power BI desktop 4 times a day.

 

This GA connector has proven to be quite unreliable over the last few years.

 

Similar to others, we're using OAuth2 and authenticating directly to GA from the Power BI service. The user account can login to GA, and can authenicate and refresh in Power BI desktop, but when we try and enter correct credentials in the Power BI service we get this JSON error.

 

We've tried reducing the volume of data brought across the GA connector, and using Power Query to eliminate errors but still get the issue.

v-venuppu
Community Support
Community Support

Hi @eclarkeMSI ,

Thank you for your response!!

 

Can you please raise a Microsoft support ticket for further investigation. You can create a Microsoft support ticket using the link below.
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn

 

If this helps, then please Accept it as a solution and dropping a "Kudos" so other members can find it more easily.

Hope this works for you!

Thank you.

SanderTK
Advocate II
Advocate II

We are facing the same issue at the moment. There is no problem using the service account to set up the connection and refresh data in PowerBI Desktop but online we get the same error when connecting to the data source credentials.

When we delete the GA gateway, and readd it again, we first get a message that SSL needs to be enabled so it might be something to do with a pop-up being blocked when connecting but this is not something the user has control over. (SSL error: "You need to use SSL (HTTPS) when you use OAuth 2.0 authentication.")

 

We initially set up the connection in 2023 and while we couldn't connect to the data source credentials anymore on that semantic model (and we can't even edit the refresh schedule on the web, only through API), the scheduled refresh was still working on that connection. By reseting the permissions in the GA dashboard for PowerBI Web, we have now broken that connection as well.

This seems to be an issue on the side of Microsoft.

v-venuppu
Community Support
Community Support

Hi @eclarkeMSI ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Hi @v-venuppu issue is still very much open, we have been unable to refresh using the powerbi service, connections works fine locally using powerbi desktop

rohit1991
Super User
Super User

Hi @eclarkeMSI ,

 

 

If you’re seeing the “unexpected character in the JSON input” error when connecting Google Analytics GA4 to Power BI, here’s what actually works: 

1. Always use the untouched, freshly downloaded JSON key from Google Cloud. Don’t open or edit the file in any other program just download and upload straight to Power BI.

2. Double-check your authentication method. For service accounts, use “Service Principal” or OAuth2 as required. If you pick the wrong one, you’ll get auth errors.

3. If you update your credentials, fully delete and re-create the connection in Power BI Service. Just “editing credentials” often isn’t enough. Re-create the data source with the new key.

 

4. If direct connection still fails, set up a Power BI Dataflow or Fabric Dataflow to pull from GA4, then use that as your source. A lot of users (myself included) have found this works even when everything else fails.

 

5. Check that you’re using HTTPS/SSL for all connections. Power BI requires this for OAuth2 and will silently fail otherwise.

 

6. Keep an eye on Power BI and Google service status sometimes it’s just a platform-wide issue. If you follow these steps and still get stuck, share the specific error or where it fails and I’ll try to help troubleshoot further. This issue is super common right now, but these steps usually get things working.

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

I tried all of what you suggested. My account is a single user organizational account, only OAuth2 is available when I Edit Credentials. No success. It just started yesterday though, it was working fine before.

udek2025
Regular Visitor

I have the same issue. anybody could solve this?

GilbertQ
Super User
Super User

Hi @eclarkeMSI 

 

I know that currently there are issues with the power BI service. This could possibly be affecting your Google analytics data and refresh.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.