web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using PowerBI dataset ...
Power Apps
Answered

Using PowerBI dataset info as data source

(1) ShareShare
ReportReport
Posted on by 878
I'm using this code to extract info from a published dataset: 
Set(
    varPBI;
    PowerBI.ExecuteDatasetQuery(
        "XXXXXXX";
        "YYYYYYY";
        "EVALUATE
        SELECTCOLUMNS(
            PowerBITable,
            ""No_"", PowerBITable[No_],
            ""CustomerNo_"", PowerBITable[CustomerNo_],
            ""SalesCode"", PowerBITable[SalesCode]
        )"
    )
);;

ClearCollect(colSalesLineRaw; varPBI.firstTableRows);;

ClearCollect(
    colSalesLine;
    ForAll(
        colSalesLineRaw;
        {
            No_: Text(Value.'[No_]');
            CustomerNo_: Text(Value.'[CustomerNo_]');
            SalesCode: Text(Value.'[SalesCode]')
        }
    )
)
And editing the PowerApp and even on the published version, this works for me. I can see details from the dataset.
 
However all other users get this error: Error of     PowerBI.ExecuteDatasetQuery, The response is not in JSON format. Cannot read server response.
 
I checked, and I shared the dataset with testing parties, and they have Read, Build permissions. They also have Power BI Pro license. So what else could be wrong?
Categories:
I have the same question (0)
  • Suggested answer
    Fredrik_A Profile Picture
    3,644 Super User 2026 Season 1 on at
    Hello,
     
    do the users have access to the dataset? This error is very common when the query returns error 401 for example.
     
    Try putting the users as Member or Contributor in the workspace.
     
    If my response solved your issue, please mark it as ✅ Accepted Answer and give it a like.
  • Verified answer
    wolenberg_ Profile Picture
    1,476 Super User 2026 Season 1 on at
    Hi There,
     

    This error usually happens because PowerBI.ExecuteDatasetQuery requires the user to have direct access to the dataset and workspace where it lives, not just “Read/Build” permissions on the dataset itself. That’s why it works for you (as the owner) but fails for others.

    The error isn’t about your code it’s about permissions and workspace access. Even with Read/Build rights, users need proper workspace membership and tenant settings enabled to run `ExecuteatasetQuery.


    ✨ If my response helped resolve your issue, please mark it as ✅ Accepted Answer and give it a ❤️ like — it helps others in the community find solutions faster. Thank you!


     
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    This issue with PowerBI.ExecuteDatasetQuery in Microsoft Power Apps usually occurs due to permission or connection context differences between the app owner and other users, even if they already have Read + Build access to the dataset in Microsoft Power BI.
    Your code itself looks correct (in my view), so the problem is almost certainly related to how Power Apps calls the Power BI REST endpoint on behalf of other users.
     
    Please verify below :
    • Check Power BI Tenant Settings for API access permissions.
    • Add users as "Viewers" to the Power BI Workspace.
    • Confirm RLS roles are correctly assigned to the testing parties.
    • Test in Incognito to rule out browser cache/authentication issues.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard