Share via

How to connect Power BI with third party social media tracking tools via API?

Smith 0 Reputation points
2026-04-22T17:06:04.43+00:00

Hi Microsoft Community,

I am a digital marketer and I need help

connecting Power BI with social media

APIs. I have following questions:

ISSUE 1 — REST API Connection:

I am trying to connect Power BI Desktop

with a social media REST API using

Web Connector but getting this error:

"Unable to connect - Authentication Failed"

ISSUE 2 — JSON Parsing:

API returns nested JSON data but Power

Query is not parsing it correctly into

proper table format.

ISSUE 3 — Scheduled Refresh:

My dashboard refreshes manually fine but

Auto Refresh in Power BI Service fails

every time with gateway error.

My Setup:

  • Power BI Desktop 2026
  • Windows 11 Pro
  • API Type: REST
  • Auth: OAuth 2.0

Please help!

Community Center | Not monitored
0 comments No comments

2 answers

Sort by: Most helpful
  1. Rakesh Mishra 8,585 Reputation points Microsoft External Staff Moderator
    2026-04-22T17:55:21.01+00:00

    Hi Smith,

    Thanks for reaching out in Microsoft Q&A forum,

    Power BI related is currently not supported in the Q&A forums, the supported products are listed over here Supported products on MS Q&A (more to be added later on).

    You can ask the experts in the dedicated MS Power platform community forum.

    Can you please open as a new thread in MS Power platform community Find Answers | Microsoft Power Platform Community

    User's image

    I hope it helps! and do let me know if you have further queries.

    Was this answer helpful?

    0 comments No comments

  2. Q&A Assist
    2026-04-22T17:06:26.3033333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Issue 1 – REST API connection (Authentication failed)

    1. Check authentication method in Web connector:
      • In Power BI Desktop, go to File > Options and settings > Data source settings.
      • Select the social media API source and choose Edit Permissions.
      • Change the Authentication method to match what the API supports (for many APIs, this is typically Web API with a bearer token, or Basic if they wrap OAuth in a token).
      • If the API does not support OAuth directly via the Web connector, use the API’s access token in the header (for example, Authorization: Bearer <token>). If the Web connector shows an error like credential type isn’t supported for this resource, the service owner must change the auth configuration or provide a custom connector.
    2. If using tools like Fiddler to debug the call and it fails:
      • In Power BI Desktop, go to File > Options and settings > Options > Global > Security.
      • Temporarily uncheck Enable certificate revocation check to allow capturing web requests.
      • Restart Power BI Desktop and retry the connection.
      • Re‑enable the certificate revocation check afterward because disabling it makes web connections less secure.
      For enterprise environments, this setting can also be controlled via Group Policy using the DisableCertificateRevocationCheck registry key under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Power BI Desktop.
    3. If the API requires OAuth 2.0 and the Web connector cannot complete the flow:
      • The service owner may need to expose an endpoint that supports the Web connector’s auth model or provide a custom connector. When the Web connector shows This credential type isn’t supported for this resource, the fix is on the API side or via a custom connector.

    Issue 2 – JSON parsing (nested JSON to tables)

    1. Load the raw JSON from the Web connector into Power Query.
    2. In Power Query, use Transform > To Table on the top‑level list/record.
    3. Expand nested records/lists step by step using the expand icon (⤢) in the column header until the structure is tabular.
    4. If parsing fails or behaves unexpectedly, enable tracing to see detailed errors:
      • Go to File > Options and settings > Options > Diagnostics.
      • Turn on tracing.
      • Reproduce the issue, then inspect logs in %LOCALAPPDATA%\Microsoft\Power BI Desktop\Traces.

    If the JSON structure is very complex or changes frequently, consider building a custom connector that encapsulates the transformation logic. For custom connectors, silent failures or load errors are often due to M script issues; tracing and the DataMashupTrace logs in the Analysis Services workspace help diagnose these.

    Issue 3 – Scheduled refresh failing in Power BI Service (gateway error)

    1. Confirm that the data source type is supported for refresh:
      • Web/REST sources are supported, but authentication must be configured in the service and must match Desktop.
    2. Reconfigure credentials in the Power BI Service:
      • In the Power BI Service, go to the workspace, open the dataset settings.
      • Under Data source credentials, edit and re‑enter credentials using the same method as in Desktop (for example, anonymous with key in URL, or Web API token).
      • If sign‑in issues occur because cached credentials are wrong, clear them in Desktop first:
        • File > Options and settings > Data source settings, select the source, choose Clear Permissions, then republish.
    3. Gateway considerations:
      • For purely cloud REST APIs (public internet), an on‑premises gateway is usually not required. If a gateway is configured and causing errors, verify whether the dataset actually needs it.
      • If a gateway is required (for example, if the API is only reachable from a specific network), ensure the gateway machine can reach the API endpoint and that the same credentials are configured in the gateway data source.
    4. If refresh still fails with generic errors:
      • Check for more detailed error messages in the dataset refresh history in the Power BI Service.
      • If the error indicates unsupported credential type, the API owner may need to adjust auth or provide a custom connector.

    General guidance for third‑party social media APIs

    • Prefer using a stable access token (or refresh‑token flow implemented outside Power BI) and pass the token to the API via headers or query parameters, rather than trying to run a full OAuth interactive flow inside the Web connector.
    • If the API supports OData or provides a template app, connect using the dedicated connector or app instead of raw Web.
    • For complex or heavily used scenarios, implement a custom connector so authentication, pagination, and JSON shaping are handled in one place.

    References:

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.