The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
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.
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.
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.
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?
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.
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.
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.
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
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.
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.
I have the same issue. anybody could solve this?
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.