Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Getting 401 Unauthorized response on specific dataset. Do not appear to have issues querying other datasets. Able to refresh target dataset without issue.
scope: Dataset.ReadWrite.All
Error response:
{ "error": { "code": "PowerBINotAuthorizedException", "pbi.error": { "code": "PowerBINotAuthorizedException", "parameters": {}, "details": [], "exceptionCulprit": 1 } } }
Hi @lgordon ,
Before you take this new REST API for a test spin, note that the tenant-level setting Allow XMLA endpoints and Analyze in Excel with on-premises datasets must be enabled in the Power BI admin portal, as depicted in the screenshot below.
Equally important and also consistent with XMLA read access, you need the Build permission for the dataset you want to query by using this new REST API. Contributors and workspace admins have this permission, but you can also grant it directly, as in the following screenshot. For more information, see Build permission for shared datasets. Also note that the workspace must be a modern (v2) workspace. Classic (legacy) workspaces are not supported. So, if your datasets still reside in a classic workspace, make sure you upgrade the workspace to the new (v2) workspace experience.
Besides, please consider about some limitations:
For more details, please refer to:
Datasets - Execute Queries - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello
As I mentioned, I am able to query other datasets with this api, just not this specific dataset. This dataset is a composite dataset that does have a DQ over AS partition which is querying another dataset in PBI service -- which as I understand is not the same as Azure Analysis Services. I don't see any written limitation indicating this.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |