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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous 

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. 

 

 

Anonymous
Not applicable

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.

Anonymous
Not applicable

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.

Anonymous
Not applicable

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.