Forum Discussion
Creating a push dataset gives a PowerBIEntityNotFound error (Issue with Service Principal only)
Hi,
I am currently investigating the BI REST API's and when I tried to create new Push DataSets from my backend service it gave me the following message:
{"error":{"code":"PowerBIEntityNotFound","pbi.error":{"code":"PowerBIEntityNotFound","parameters":{},"details":[],"exceptionCulprit":1}}}
I then tried to use the API from the API experiment website and it worked with my user. But when I tried with the Service Principal (which have admin access on my workspace), it created an error like the GroupId didn't exists or I don't know.
Here's my setup:
- Service Principal account
- Power BI tenant settings sets on the SP (Azure portal, application settings)
- SP have full access (admin) to the Group ID or Workspace depending how you prefer to name it
- Service Principal does the get token using the MS Lib and usually work to generate token in order to view reports, get tiles, etc. (Power BI Embedded)
- Code does a call to the DataSet API to post a new dataset (push): https://api.powerbi.com/v1.0/myorg/groups/{Group_Id}/datasets
Content of the call:
{
"name": "MyFirstPushDs",
"tables": [{
"name": "MyFirstTable",
"columns": [{
"name": "Id",
"dataType": "Int64"
},{
"name": "Name",
"dataType": "String"
}]
}]
}
Is there something I am missing?
In case you need more details, I'll add them here. I tried also to do the post from Postman and got the same error as in my application.
- Anonymous5 years ago
I will cancel my question since it worked for a different workspace (somehow). So I don't totally understand why it worked in one and not the other.
1 Reply
- AnonymousNot applicable
I will cancel my question since it worked for a different workspace (somehow). So I don't totally understand why it worked in one and not the other.