Forum Discussion
How to retrieve authenticated user for power BI connector to Exchange Online
- 2 years ago
Hi crixo,
Unfortunately, directly retrieving the authenticated user within the Power BI connector for Exchange Online (published to the Power BI service) isn't possible. This is due to security limitations to prevent unauthorized access to potentially sensitive data.
Here are some of the authentication differences between Power BI Desktop and the Power BI service:
Power BI Desktop:
- Users authenticate with their credentials within the desktop application.
- The connector leverages those credentials to access data.
Power BI Service:
- Reports are published and shared with users.
- Users accessing the report inherit the data access permissions granted to the report itself.
- The report itself doesn't have the capability to retrieve or utilize the individual user's credentials.
You can go for alternate solutions as:
Row-Level Security (RLS)
Security Groups
Embed Reports (Pro License Required)
If you find this insightful, please provide a Kudo and accept this as a solution.
Hi crixo,
Here is some detailed explanation about Embed Reports method:
Embedding Power BI reports (requires a Pro license) involves integrating them into a secure web application or portal. This allows users within the application to view the report data without directly accessing the Power BI service. Here's a breakdown of the process:
1. Prerequisites:
- Power BI Pro License: You'll need a Power BI Pro license to enable embedding functionalities.
- Developed Web Application: You'll need a developed web application or portal where you intend to embed the report. This application can be built using various web development frameworks and languages.
2. Publishing the Report for Embedding:
- Open the Power BI Desktop report you want to embed.
- Go to File > Publish > Publish to web (preview).
- In the Publish to web pane, choose the workspace where your report resides and select the report you want to embed.
- Under Embed settings, choose the Embed for your organization or Embed for your customers option depending on your audience.
- Configure additional settings like access level, toolbar visibility, and refresh behavior as needed.
- Click Publish.
3. Integrating the Report into Your Application:
- Power BI will generate an embed code snippet containing the URL, access token, and other configuration details.
- In your web application code, implement the embed code using the Power BI JavaScript API. This API provides functions for embedding reports, handling user interactions, and filtering data within the report.
- You'll need to handle user authentication within your application if using "Embed for your organization" and want to enforce AAD authentication for viewers.
Resources:
- Power BI Embedding Documentation: https://learn.microsoft.com/en-us/power-bi/developer/embedded/
- Power BI JavaScript API Reference: https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/
If you find this insightful, please provide a Kudo and accept this as a solution.