Forum Discussion
PowerBI Service Scheduled refresh error for Google Analytics
- 1 year ago
Hi all, this has been resolved by devs it seems. I went to check if I could put my report back on scheduled refresh just there and it is now working again. So, the token issue that I am assuming was preventing the connection from Google Analytics to Power BI is now working fine.
Hi pawankarki23,
Thanks for reaching out to the Microsoft fabric community forum.
This is a known issue currently affecting the Google Analytics (GA) connector v2 when used in the Power BI Service. While the connection and data refresh work correctly in Power BI Desktop, users are experiencing the following error when attempting to configure scheduled refresh in the Service "Failed to update data source credentials: We found an unexpected character in the JSON input."
This typically occurs during the credential editing process using OAuth 2.0 with organizational account in the Service. Based on current understanding, the issue appears to be related to how the Service backend handles the OAuth response returned by Google, potentially due to a change in the response format or a parsing issue in the connector implementation.
As this issue is limited to Power BI Service. Desktop continues to work as expected and other Google-based connectors like BigQuery may not face this issue due to a different authentication flow.
At this time, there is no confirmed workaround using the GA connector v2 directly in Power BI Service. We recommend opening a Microsoft support ticket if you're a Pro or Premium user so our team can escalate and gather more diagnostics.
Reach out to Microsoft Support by raising a ticket with Microsoft Support. Please refer below link on how to raise a contact support or support ticket.
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi pawankarki23,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.
- GEJ1231 year agoNew Member
Hi, I also have this problem and can't find a solution that works.
- COS0199701 year agoFrequent Visitor
Hi ,
I am after encountering the same issue. I have Power Bi connected to Google Analytics too. The connection works fine when I use the PowerBI Desktop to create the report and it publishes to the web fine. It was working fine too with the Scheduling refresh on the web service of Power BI up until last Wednesday. It stopped connecting on Data source credentials part and I am getting this error:
Failed to update data source credentials: We found an unexpected character in the JSON input.Hide details
Activity ID: 7da358fb-3efb-414d-9fab-0dd7af2ed6c1 Request ID: b71e5b5e-c5ab-8cd6-cd7a-bf229353c122 Status code: 400 Time: Thu May 08 2025 16:46:17 GMT+0100 (Irish Standard Time) Service version: 13.0.25830.39 Client version: 2504.4.23986-train Cluster URI: https://wabi-north-europe-k-primary-redirect.analysis.windows.net/ I have tried all of these suggested solutions and none of them have worked:
✅Suggested Fixes
1. Re-authenticate GoogleAnalytics Connector
- In the Power BI Service, go to:
Settings > Datasets > [Your Dataset] > Data source credentials. - Next to GoogleAnalytics, click Edit credentials.
- Use OAuth2 as the authentication method.
- Re-enter your Gmail credentials and ensure that the correct permissions (e.g., analytics.readonly) are granted.
2. Use Organizational Account (Not Anonymous/Web API)
Ensure you're not using the “Anonymous” or “Web API” options during authentication. These may generate incorrect request payloads that include invalid JSON headers.
3. Clear & Reset Credentials
Sometimes Power BI caches problematic tokens. Do the following:
- Remove credentials by choosing Clear permissions.
- Reconnect with the correct authentication method.
4. Check Gateway Configuration (if used)
If you're using a Power BI Data Gateway, ensure:
- The gateway is online and up to date.
- You’ve correctly configured the data source mapping in the gateway for GoogleAnalytics.
5. Validate Dataset JSON Config
If you have access to the PBIX file:
- Open it in Power BI Desktop.
- Go to Transform Data > Data source settings, and ensure the URL or query you’re using for GoogleAnalytics is correct and does not contain invalid characters.
- Re-publish the dataset.
🛠Additional Debugging
- If the problem persists:
- Test a clean Gmail connector setup in a new Power BI report to isolate the issue.
- Ensure your Google Analytics account is still active and hasn’t been transitioned to GA4 (which may require different connector logic).
- Check the Google API Console for any blocked API requests or permission errors.
- If the problem persists:
- In the Power BI Service, go to:
- Anonymous1 year agoNot applicable
Based on the consistent error message of "unexpected character in the JSON input" and the fact that multiple users have reported this, the root cause is very likely a change or regression in how the Power BI Service handles the OAuth token response from the Google Analytics connector v2.
More specifically the Power BI Service backend is failing to parse a part of the OAuth 2.0 response JSON but this does not affect Power BI Desktop, as the OAuth flow there is handled differently (locally).
Roight now you can use BigQuery as an Intermediary if your organization has access to BigQuery (especially if you’re using GA4). Export your Google Analytics data to BigQuery (this is supported natively in GA4). Then in Power BI Service, connect to BigQuery using the BigQuery connector (OAuth works fine here). Now schedule refresh using that source.
If you are still unable to solve the issue you can reach out to Microsoft Support by raising a ticket with Microsoft Support.
Please refer below link on how to raise a contact support or support ticket.
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft LearnBest Regards,
Hammad.
Community Support Team- Lawliim1 year ago
Advocate I
I have same issue that popped up maybe 1 month ago? (Used to work before that...)
And it kinda affects my entire workspace of external dashboards for clients >100 🙂
I appreciate the workaround, but shouldn't a connector provided by MSFT also be usable for PowerBI Service ideally? And why do we have to submit a ticket when it is clear that this is a recurring problem/bug based on the answers here. Or is it implied that developers and PM don't read these forums and only will move for a fix if somebody submits a ticket?- Anonymous1 year agoNot applicable
Hi Lawliim,
Thank you for your response. As this forum is an open platform for all users to raise their queries and share their problems/issues related to PowerBi and Microsoft Fabric, sometimes there are issues which are escalated to Microsoft Support teams where they extensively work on the issue and try to solve it.
Best Regards,
Hammad.
- COS0199701 year agoFrequent Visitor
I tried to set up a BigQuery connector in the meantime while the Google Analytics to Power BI Connection was not working for the Scheduled refresh and I got to a certain point and it was failing to connect to the BigQuery project I had set up.
SQL Statement I am trying to use:
SELECT
PARSE_DATE('%Y%m%d', event_date) AS date,
user_pseudo_id,
device.category AS device_category,
device.web_info.browser,
device.operating_system,
geo.city,
geo.country,
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = "page_title") AS page_title,
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = "content_group") AS page_category,
engagement_time_msec
FROM
`cogent-node-459214-r4.analytics_320122991.events_*`
WHERE
_TABLE_SUFFIX BETWEEN '20250101' AND '20250516'
AND event_name IN ('page_view', 'user_engagement');Is there something wrong with the SQL Query I am using here as it keeps failing. I am trying to find out how can Query the BigQuery project I have created based on the GA4 Data I have.