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

Embedding with RLS: NulLReferenceException when Generating Token

$
0
0

I am getting a nullreferenceexception on the line 

var accessToken = "@Model.EmbedToken.Token";

 

The report was rendering properly before attempting RLS. Here's my controller:

else
{
// Generate Embed Token for reports without effective identities.
generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "view", identities: new List<EffectiveIdentity> { new EffectiveIdentity(username: System.Web.HttpContext.Current.User.Identity.GetUserId(), roles: new List<string> { "allusers" }, datasets: new List<string> { "12dac33c-af76-4e1b-b064-57d837679b0c" }) });
}

var tokenResponse = await client.Reports.GenerateTokenInGroupAsync(GroupId, report.Id, generateTokenRequestParameters);

Viewing all articles
Browse latest Browse all 18014

Trending Articles



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