cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
threki
New Member

PowerBI Embedded 404 Report not found with JS Sample Code

Hi all,

So I've been trying for the past few days to make the demo sample AppOwnsData in JS work with a custom report I published in a workspace.

I'm using a Service Principal and I'm pretty confident I've setup everything correctly with our IT to make sure that the SP can connect and fetch reports :

  • SP has Tenant Read and write access
  • SP is admin of the workspace
  • A Capacity of Power Bi embedded has been assigned to the workspace
  • The SP is in a security group and access to the APIs has been enable for SPs

 

The token generation works well but whenever I'm fetching a report in the workspace I stumble upon this :

 

 

{
    "error": {
        "code": "PowerBIEntityNotFound",
        "pbi.error": {
            "code": "PowerBIEntityNotFound",
            "parameters": {},
            "details": [],
            "exceptionCulprit": 1
        }
    }
}

 

 

I'm running out of ideas on where to look at, I'm pretty sure the code samples should work out of the box and I should not have to fix and debug them by myself...

1 ACCEPTED SOLUTION

I've followed this steps already, as mentioned in my first post. Yet it didn't work.

I finally made it through by setting up Delegated permissions for Power BI to the SP like so

 

image.png

 

I tried hopeless to upload a new report and it finally showed up. But not the one previously created...

 

I still can not see  the capacities through the API, but fortunately our admin can see it in the admin portal and gave the capacity ID so I managed to successfully apply the Capacity to the workspace through the API.

View solution in original post

4 REPLIES 4
RicoZhou
Community Support
Community Support

Hi @threki 

According to your statement:
SP has Tenant Read and write access
SP is admin of the workspace
A Capacity of Power Bi embedded has been assigned to the workspace
The SP is in a security group and access to the APIs has been enable for SPs

I think there may be something wrong in your Service Principal setting.

Firstly, app owns data has two kinds of authentication method: Master User and Service Principal.

Here you use Service Principal. You don't need to give api permission in your Azure portal(Tenant Read and write access) to your app if you use this authentication method. 

Follow this way to check your Service Principal: Embed Power BI content with service principal and an application secret

When using a service principal, it's recommended to limit its access to the tenant settings using a security group. Please select Sepcific security groups and add your security group into it. Then make sure your service principal is the member or admin of the workspace.

1.png

Check the parameter you need: 

1.png

For more details about embed for customer: Tutorial: Embed Power BI content using a sample embed for your customers application

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

 

 

I've followed this steps already, as mentioned in my first post. Yet it didn't work.

I finally made it through by setting up Delegated permissions for Power BI to the SP like so

 

image.png

 

I tried hopeless to upload a new report and it finally showed up. But not the one previously created...

 

I still can not see  the capacities through the API, but fortunately our admin can see it in the admin portal and gave the capacity ID so I managed to successfully apply the Capacity to the workspace through the API.

View solution in original post

threki
New Member

Just had the idea of getting all the reports in my group and this is the result, what am I missing ?

 

{
    "@odata.context": "http://wabi-europe-north-b-redirect.analysis.windows.net/v1.0/myorg/groups/my-group-id/$metadata#reports",
    "value": []
}

 

PS : As a lot of MS websites I can't sign in using Firefox, I had to switch to Chrome to come here... Thank you guys.

Same for my capacities, I've created 2 and can't get them in /capacities, the only result is

"displayName": "Premium Per User - Reserved"

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors