Forum Discussion

NarendraReddy's avatar
NarendraReddy
Regular Visitor
1 year ago
Solved

GraphQL Endpoint on Power BI report

Hi everyone, Has anyone here tried connecting a GraphQL endpoint in Microsoft Fabric to a Power BI report or dataset? I'm interested in hearing about your implementation process and your experience ...
  • v-hashadapu's avatar
    1 year ago

    Hi NarendraReddy , Thank you for reaching out to the Microsoft Community Forum.

     

    Create a GraphQL API in your Fabric workspace by selecting New Item -> API for GraphQL. Choose the data source and the specific tables or views you want to expose. Use the GraphQL editor to define any necessary relationships and publish the schema. Then, register an app in Entra ID and assign the GraphQLApi.Execute.All permission to allow Power BI or service principals to access the API securely. Note the endpoint URL from the API's "Manage Permissions" section.

     

    To connect Power BI, the easiest method is using Power BI Desktop’s Web connector. Choose Get Data -> Web and use the advanced settings to send a POST request with your GraphQL query. Authenticate with an organizational account that has access to both the API and the underlying data source if SSO is used. You can also pull data into a Dataflow Gen2 or Fabric Notebook. Dataflows offer a low-code method to retrieve and transform data, while Notebooks let you write Python code using requests and pandas to query the API and store results in a Lakehouse or Warehouse table for reporting.

     

    A few challenges you might face include defining complex relationships in the schema, managing Entra ID authentication properly and flattening nested GraphQL responses in Power Query or Python. For large datasets, GraphQL can be slower than other Fabric access methods like Direct Lake. To improve performance, cache results in a Lakehouse table and let Power BI query that directly.

     

    In terms of performance and accuracy, the Fabric GraphQL API works well for small to medium datasets (up to ~100K rows), especially when querying specific fields. However, for more complex or large-scale analytics, Direct Lake or SQL endpoints typically offer better speed. Data accuracy is reliable if your schema and field mappings are well-defined and regular refreshes keep data up to date.

     

    If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
    Thank you.