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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
muhammedaliasad
New Member

By pass sign in step in power bi embedded link

After creating Master user App in App Registration option of Azure Entra ID, Grant Admin consents to the assigned delegate API permissions, and then create the token through PublicClientApplicationBuilder through .NET sdk.

List of Permissions:

App.Read.All
Capacity.Read.All
Capacity.ReadWrite.All
Connection.Read.All
Connection.ReadWrite.All
Connection.Reshare.All
Content.Create
Dashboard.Execute.All
Dashboard.Read.All
Dashboard.ReadWrite.All
Dashboard.Reshare.All
Dataflow.Execute.All
Dataflow.Read.All
Dataflow.ReadWrite.All
Dataflow.Reshare.All
Dataset.Read.All
Dataset.ReadWrite.All
Environment.Execute.All
Environment.Read.All
Environment.ReadWrite.All
Environment.Reshare.All
Eventhouse.Execute.All
Eventhouse.Read.All
Eventhouse.ReadWrite.All
Eventhouse.Reshare.All Eventstream.Execute.All Eventstream.Read.All Eventstream.ReadWrite.All Eventstream.Reshare.All Gateway.Read.All Gateway.ReadWrite.All Item.Execute.All Item.Read.All Item.ReadWrite.All Item.Reshare.All Pipeline.Deploy Pipeline.Read.All Pipeline.ReadWrite.All Report.Execute.All Report.Read.All Report.ReadWrite.All Report.Reshare.All SQLEndpoint.Execute.All SQLEndpoint.Read.All SQLEndpoint.ReadWrite.All SQLEndpoint.Reshare.All StorageAccount.Read.All StorageAccount.ReadWrite.All Tenant.Read.All Tenant.ReadWrite.All UserState.ReadWrite.All Warehouse.Execute.All Warehouse.Read.All Warehouse.ReadWrite.All Warehouse.Reshare.All Workspace.GitCommit.All Workspace.GitUpdate.All Workspace.Read.All Workspace.ReadWrite.All



To embedd the generated token,embed url on the client side I used power bi javaScript API to configure client side embedding.

I passed the following params:

 

 

 

  let config = {
                type: 'report',
                tokenType: models.TokenType.Embed,
                accessToken: embedToken,
                embedUrl: reportContent.EmbedUrl,
                groupId: workspaceId,
                id: reportId,
                permissions: models.Permissions.All,
                viewMode: models.ViewMode.View,
                settings: {
                    panes: {
                        filters: {
                            visible: true
                        },
                        pageNavigation: {
                            visible: true
                        }
                    },
                    bars: {
                        statusBar: {
                            visible: true
                        }
                    }
                }
            };

        // Get a reference to the embedded report HTML element
           let embedContainer = $('#embedContainer')[0];

            // Embed the report and display it within the div container.
             report = powerbi.embed(embedContainer, config);


            console.log("PowerBI Client Embed Log:", report)

            // report.off removes all event handlers for a specific event
            report.off("loaded");

            // report.on will add an event handler
            report.on("loaded", function () {
                loadedResolve();
                report.off("loaded");
            });

            // report.off removes all event handlers for a specific event
            report.off("error");

            report.on("error", function (event) {
                console.log(event.detail);
            });

            // report.off removes all event handlers for a specific event
            report.off("rendered");

            // report.on will add an event handler
            report.on("rendered", function () {
                renderedResolve();
                report.off("rendered");
            });

 

 

 


I have verified my steps several times. I am following all the steps according to the documentation. When I tried to view my embedded report Its giving me PowerBIEntityNotFound Error.

Get Report Failed - 404 PowerBIEntityNotFound
Load Report Failed - 404 PowerBIEntityNotFound

I have tried many other solutions like accessing the PowerBI Rest API to generate access token, and then generate embedURL through get report endpoint but getting same error when trying to embed the url with the powerbi client library.

If I include "autoAuth=true" in the embedUrl, it will display a sign-in button within the iframe container. However, I wish to bypass this step so that the report can be viewed in the iframe with an access token appended to the URL. When the token expires, the URL will no longer display the report data.


3 REPLIES 3
AmosHersch
Employee
Employee

I would suggest trying to see which request to Power BI fails with the EntityNotFound error. Maybe the response body has additional information.

Such an error usually indicates that the entity ID (maybe report ID/dataset ID) does not exist, or the master user doesn't have the required permissions  to access it.  

d_gosbell
Super User
Super User

If you are using the Master Account approach have you added the account to the workspace as an Admin or Member and granted it an Pro license? 

Yes, I have already added the account as an Admin to the workspace and also granted it a Pro license.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.