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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DavideBono97
Helper I
Helper I

RLS with dataset import

Hi

 

I have a report linked to a dataset via import schema

The dataset has RLS

I'm trying to embed this report like this 

 

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...

 

I received this error after one minute of loading :

 

PowerBI service client received error HTTP response. HttpStatus: 503. PowerBIErrorCode: OpenConnectionErrorOpenConnectionError: Failed to open the MSOLAP connection.

 

I tried then without RLS and everything works

Also a report linked to a dataset via DirectQuery with RLS also works

 

What can I do for dataset import with RLS ?

Thanks in advance

 

2 REPLIES 2
Anonymous
Not applicable

Hi @DavideBono97 ,

Hi, the issue was related to RLS. There was a rogue space in the code, specifically where we defined the Role. Hopefully this is helpful to someone in the future.

 

Solved: Re: Failed to open the MSOLAP connection. - PowerB... - Microsoft Power BI Community

 

Best Regards
Community Support Team _ Polly

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

Hello
Could you please detail the problem?
Do you mean on the security of the dataset or what I pass as RLS to get a token on the server code?

 

Thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 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.