Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

329
Views
Incruste PowerBI con RLS

Estoy tratando de incrustar un informe de powerbi en un proyecto .NET Core con RLS (seguridad de nivel de fila)

El problema es que no puedo agregar la referencia al embedToken en la interfaz.

Aquí está el código frontal:

 <script type="text/javascript"> // This code is for sample purposes only. // Configure IFrame for the Report after you have an Access Token. window.onload = function () { var reportData = @Html.Raw(Json.Serialize(Model)); var accessToken = reportData.AccessToken; var embedUrl = reportData.EmbedUrl; var reportId = reportData.ReportId; //show panel for admins if (userIsAdmin == "true") { filterPaneEnabled = true; } else { filterPaneEnabled = true; } var config = { type: 'report', accessToken: accessToken, embedUrl: embedUrl, tokenType: models.TokenType.Embed, id: reportId, settings: { filterPaneEnabled: filterPaneEnabled, navContentPaneEnabled: true } }; // Grab the reference to the div HTML element that will host the report. var reportContainer = document.getElementById('reportContainer'); // Embed the report and display it within the div container. var report = powerbi.embed(reportContainer, config); }; </script>

Aquí está la generación de tokens de back-end al proporcionar una identidad/función efectiva para rls:

 var rls = new EffectiveIdentity(username: "someuser", new List<string> { "someid" }); var rolesList = new List<string>(); rolesList.Add("DYNAMIC_RLS"); rls.Roles = rolesList; var embedToken = client.Reports.GenerateTokenInGroup(groupId, reportId, new GenerateTokenRequest(accessLevel: "View", datasetId: "someid", rls)); EmbedToken token = await GetEmbedToken(client, reportId, groupId, accessToken); Report powerBIReport; powerBIReport = await GetPowerBIReport(client, reportId, groupId); if (powerBIReport != null) { model.ReportId = reportId; model.ReportName = report.Name; model.EmbedToken = token; model.AccessToken = accessToken; model.EmbedUrl = powerBIReport.EmbedUrl; model.UserIsAdmin = "false"; }

Aquí están los errores que estoy recibiendo: Me di cuenta si elimino " tokenType: models.TokenType.Embed" de la configuración de front-end, el informe muestra pero no se muestra rls.

¿Algun consejo? ¡He verificado que el token de inserción se genera correctamente cuando me conecté a través del entorno sandbox de powerbi!

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!