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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
msantos5
New Member

Power BI REST API returns PowerBIEntityNotFound for dataset with upstream

I have two datasets, dataset A and dataset B, both in the same workspace. Dataset B uses dataset A as an upstream data source.

I can execute queries via the API on dataset A, using the service principal (admin) for authentication.

However, when I try to execute queries on dataset B, Power BI returns the following error:

{
  "error": {
    "code": "PowerBIEntityNotFound",
    "pbi.error": {
      "code": "PowerBIEntityNotFound",
      "parameters": {},
      "details": [
        {
          "code": "DetailsMessage",
          "detail": {
            "type": 1,
            "value": "You cannot query the dataset 'c3fa76d7-4dea-4999-bf27-***********' by using the REST API because the dataset was not found or you do not have the required permissions. Please contact a workspace admin or a dataset owner to grant you the required permissions. See https://go.microsoft.com/fwlink/?linkid=2190204 for more info on required permissions."
          }
        }
      ]
    }
  }
}

All the required options listed in the documentation for this endpoint are already enabled in the tenant where they are located, and the service principal used for authentication is already an admin of the workspace that contains both datasets.

I ran some tests and I can execute queries on dataset B via the XMLA endpoint using the same service principal.

Dataset B Scan:

                {
                    "id": "c3fa76d7-4dea-4999-bf27-***********",
                    "name": "Relatório  Service Now - Refactory",
                    "configuredBy": "user@email.com",
                    "configuredById": "146d0bbd-04d2-479b-b01c-**********",
                    "isEffectiveIdentityRequired": false,
                    "isEffectiveIdentityRolesRequired": false,
                    "targetStorageMode": "Abf",
                    "createdDate": "2026-02-03T14:06:48.86",
                    "contentProviderType": "PbixInCompositeMode",
                    "upstreamDatasets": [
                        {
                            "targetDatasetId": "25806921-b100-447e-b447-***********",
                            "groupId": "GroupID"
                        }
                    ],
                    "tags": []
                }


Dataset A Scan:

                {
                    "id": "25806921-b100-447e-b447-***********",
                    "name": "Conjunto de dados Service Now - Refactory",
                    "configuredBy": "user@email.com",
                    "configuredById": "146d0bbd-04d2-479b-b01c-**********",
                    "isEffectiveIdentityRequired": false,
                    "isEffectiveIdentityRolesRequired": false,
                    "targetStorageMode": "Abf",
                    "createdDate": "2026-01-14T14:56:23.85",
                    "contentProviderType": "PbixInImportMode",
                    "datasourceUsages": [
                        {
                            "datasourceInstanceId": "b29ef488-aa00-4fed-8ce5-************"
                        }
                    ],
                    "tags": []
                },

 

Lineage:

msantos5_0-1770730564930.png

 

Thanks in advance for any help.

1 ACCEPTED SOLUTION
mohit_sakhare
Resolver II
Resolver II

Hi,

What you’re hitting is not a permissions problem — it’s a limitation of the ExecuteQueries REST API with composite / upstream models.

Your Dataset B is PbixInCompositeMode and has upstreamDatasets (i.e., it’s a composite model that depends on another semantic model). In these scenarios, the ExecuteQueries REST endpoint can fail with “PowerBIEntityNotFound” even when the dataset exists and the caller is a workspace admin. This aligns with other reported cases where ExecuteQueries works for import models, but fails once a model becomes composite / DirectQuery over another semantic model.

A few important points:

  • The ExecuteQueries API has several limitations (and service principal scenarios have additional limitations such as RLS/SSO restrictions).

  • Composite models introduce extra security/lineage requirements (permissions across all participating models) and, in practice, REST ExecuteQueries is not reliable/unsupported for composite models even though XMLA works.

Recommended workarounds:

  1. Query Dataset A instead (the upstream/import model) via ExecuteQueries, since that’s the part the REST API supports reliably.

  2. Continue using the XMLA endpoint for Dataset B (since you confirmed it works) — XMLA is generally the more robust option for programmatic querying at scale.

  3. If you must use REST ExecuteQueries, consider restructuring so Dataset B is not composite (i.e., avoid “dataset over dataset” / upstream dependency).

So, bottom line: Dataset B being a composite model with upstream datasets is the reason you’re getting PowerBIEntityNotFound via REST, while XMLA still succeeds.

View solution in original post

3 REPLIES 3
v-priyankata
Community Support
Community Support

Hi @msantos5 

Thank you for reaching out to the Microsoft Fabric Forum Community.

@mohit_sakhare Thanks for the inputs.

I hope the information provided by user was helpful. If you still have questions, please don't hesitate to reach out to the community.

 

Hi @msantos5 

Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.

mohit_sakhare
Resolver II
Resolver II

Hi,

What you’re hitting is not a permissions problem — it’s a limitation of the ExecuteQueries REST API with composite / upstream models.

Your Dataset B is PbixInCompositeMode and has upstreamDatasets (i.e., it’s a composite model that depends on another semantic model). In these scenarios, the ExecuteQueries REST endpoint can fail with “PowerBIEntityNotFound” even when the dataset exists and the caller is a workspace admin. This aligns with other reported cases where ExecuteQueries works for import models, but fails once a model becomes composite / DirectQuery over another semantic model.

A few important points:

  • The ExecuteQueries API has several limitations (and service principal scenarios have additional limitations such as RLS/SSO restrictions).

  • Composite models introduce extra security/lineage requirements (permissions across all participating models) and, in practice, REST ExecuteQueries is not reliable/unsupported for composite models even though XMLA works.

Recommended workarounds:

  1. Query Dataset A instead (the upstream/import model) via ExecuteQueries, since that’s the part the REST API supports reliably.

  2. Continue using the XMLA endpoint for Dataset B (since you confirmed it works) — XMLA is generally the more robust option for programmatic querying at scale.

  3. If you must use REST ExecuteQueries, consider restructuring so Dataset B is not composite (i.e., avoid “dataset over dataset” / upstream dependency).

So, bottom line: Dataset B being a composite model with upstream datasets is the reason you’re getting PowerBIEntityNotFound via REST, while XMLA still succeeds.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.