Forum Discussion

SameerSalmani's avatar
SameerSalmani
Frequent Visitor
2 years ago

Authentication and Integration Issues with Azure AD and Power BI.

I am encountering with authentication using Azure AD and integration of Power BI with my C# application.

Integration of Power BI with C# Application:
I am experiencing challenges with integrating Power BI into my C# application, specifically when attempting to segregate customers or users based on their designations. While this issue does not arise when using Power BI alone, it surfaces when accessing the existing dashboard through the C# application.

Utilize a service principal for Azure AD authentication in my C# application by registering the application, assigning appropriate roles, and generating the client ID (applicationId), tenant ID, and client secret (applicationSecret) for authentication with Azure services.

 

Specific Error Encountered in Power BI:
Moreover, when applying Row-Level Security (RLS) in Power BI, I encountered the following error message:
"Status: BadRequest (400)
Response: {"error":{"code":"InvalidRequest","message":"Creating embed token for accessing dataset 35c3d20d-b9ec-489f-bd20-aa349cad2fff requires effective identity to be provided"}}
RequestId: 903a07d3-7bc8-451f-8466-826daf01338b"

This error is hindering my progress, and I am seeking guidance on resolving it effectively.

2 Replies

  • v-weiyan1-msft's avatar
    v-weiyan1-msft
    Icon for Community Support rankCommunity Support

    Hi SameerSalmani ,

     

    I am not sure if I understood your question correctly.
    Based on your description, it seems that you are trying to use Power BI Embedded to embed reports or dashboards into your C# application, and also apply RLS to restrict the data access for different users or customers.
    Regarding the specific error message that you encountered, it may indicate that you did not provide the effective identity in the embed token, or that the effective identity did not match the RLS role or rule.


    Best Regards,
    Yulia Yan


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

    • SameerSalmani's avatar
      SameerSalmani
      Frequent Visitor

      I am currently working on a C# web form / MVC application that embeds a Power BI report for our customers. While the application has been successfully developed, I am encountering challenges related to user authentication and role-based data filtering.

      Problem Overview:

      User Authentication:
      I am struggling to implement a user authentication mechanism within my C# web form application. The goal is to ensure that users are authenticated appropriately, allowing them to access the embedded Power BI report based on their roles.


      Role-Based Data Filtering:
      My primary challenge lies in the implementation of role-based data filtering. I want users to see only the data that aligns with their assigned roles when interacting with the embedded Power BI report.

       

      Specific Questions:

      1.How can I implement a secure and effective user authentication mechanism within my C# web form application for Power BI access?

      2.What are the best practices for dynamically filtering data in a Power BI report based on user roles within a C# web form application?

       

       

      Best regards,

      Sameer