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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
DavideBono97
Helper I
Helper I

Embed report error - DatabaseDoesNotExistOrUserDoesNotHavePermission

I have a report that if I open normally from app.powerbi.com everything works

If I embed the report I get this client error :


An unexpected error has occurred.. Unable to render a visual report titled: undefined"
Message
DatabaseDoesNotExistOrUserDoesNotHavePermission

 

DavideBono97_0-1670928271194.png

 

What can I check ?

Thanks in advance

2 REPLIES 2
Tutu_in_YYC
Super User
Super User

How did you embed the report? Which embed link did you use?

The report I'm trying to embed is in one workspace while the dataset is in another workspace

to create the embedtoken I use this piece of code :

on the v2WsID there are the two workspace ID

 

var tokenRequest = new GenerateTokenRequestV2(reports: new List<GenerateTokenRequestV2Report>() { new GenerateTokenRequestV2Report(report.Item1) },
datasets: v2DatasetID.Select(datasetId => new GenerateTokenRequestV2Dataset(datasetId.ToString())).ToList(),
identities: v2rls,
targetWorkspaces: v2WsID
);

// Generate Embed token
var getToken = client.EmbedToken.GenerateToken(tokenRequest);

 

My config client side is : 

 

var config = {
                    type: pbiType,
                    tokenType: pbiModels.TokenType.Embed,
                    //theme: { themeJson: getCurrentTheme() },
                    accessToken: options.TOKEN,
                    datasetBinding: {
                        datasetId: options.DATASETID,
                    },
                    embedUrl: options.EMBEDURL,
                    id: options.IDREPORT,
                    layoutType: models.LayoutType.Custom,
                    customLayout: {
                        displayOption: models.DisplayOption.FitToPage
                    },
                    permissions: pbiModels.Permissions.All,
                    viewMode: pbiModels.ViewMode.View,
                    settings: { 
                        panes: {
                            filters: {
                                visible: false
                            },
                            pageNavigation: {
                                visible: false
                            }
                        }
                    },
                };

 

Embed url generate is : https://app.powerbi.com/reportEmbed?reportId=9791f758-966c-4910-b394-3504eb9d9b9f&groupId=911bc871-5...

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.