Power BI Embed and passing data from user interactions between it and the custom application

Discussão em 'Angular' iniciado por Cory Koch, Dezembro 5, 2024.

  1. Cory Koch

    Cory Koch Guest

    Question:


    How do you associate "Custom app" users with the Power BI Service? In other words how do you pass Custom App user data to the Power BI Service? For example is there a way to pass the Custom Apps userId or any other information through to the Power BI Service and then through to the Power Automate Flow? This section Enforce data permissions makes it sound like this is possible, but I cannot find any concrete examples of how to do this.

    [​IMG]

    Background:


    Currently, we are working on a proof on concept for embedding Power BI Dashboards into Angular apps. In order to allow the user interaction with the embedded Dashboard to trigger events in the Angular app, we are using Power Automate buttons to trigger flows to Amazon SQS to push data onto the Queue which the frontend is listening for and then using the extracted data from the dashboard to continue with native Angular actions. The problem we are trying to solve now though is how do we associate the Angular App users to the Power BI/Power Automate interactions.

    For Embedded Power BI, we are using a Service Principal and have been following the architecture outlined in the links below. This diagram is very close to what we are doing usage-scenario-embed-for-your-customers

    Links

    Attempt:


    I have attempted to add the rlsIdentity like this:

    var rlsIdentity = new EffectiveIdentity(
    username: $"userId: {userId}"
    );
    // Generate Embed Token.
    var generateTokenRequestParameters = new GenerateTokenRequest(
    identities: [rlsIdentity],
    accessLevel: "view"
    );
    var tokenResponse = await _client.Dashboards.GenerateTokenInGroupAsync(workSpaceID, dashboard.Id, generateTokenRequestParameters, cancellationToken);


    However this causes an error, which I will reproduce later and update this question with. Even if I can get this to work I am not sure how to retrieve this from the Power BI Dashboard.

    Continue reading...

Compartilhe esta Página