Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 18119

PowerBi RLS with embedded analytics: spaces in username parameter

$
0
0

Hi, everybody!

I'm testing Power BI RLS with embedded analytics, and I perform steps from this article: https://powerbi.microsoft.com/ru-ru/documentation/powerbi-developer-embedded-rls/#applying-user-and-role-to-an-embed-token

However I stuck on generating embed token, as I always get error code Bad request with message "Invalid effective username provided"

 

var generateTokenRequestParameters = new GenerateTokenRequest(
                    accessLevel: "view",                   
                    identities: new List<EffectiveIdentity> {
                        new EffectiveIdentity(username: "Andrey Ma", roles: new List<string> { "Manager" },
                        datasets: new List<string> { "3c1a920e-8389-44a7-8375-c179bb3b0fb2" }
                        )});
var tokenResponse = await client.Reports.GenerateTokenInGroupAsync(groupId, "f8288d00-81fb-4ffb-bd2f-c842079039f5", generateTokenRequestParameters);

I created report with RLS from Retail Analysis Sample

report with rls.jpg

 

One interesting thing to notice, when I pass value of username without spaces, token generated successfully and report with RLS works normally. So, how I should work with values with spaces?


Viewing all articles
Browse latest Browse all 18119

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>