Forum Discussion
Connect from PowerBI Desktop to Azure SQL database using EntraID
- 1 year ago
Hi RosG
Connecting from Power BI Desktop to Azure SQL databases using Entra ID (formerly Azure AD) is indeed possible. Here are the steps and best practices to ensure a secure connection using AD accounts:
Connecting Power BI Desktop to Azure SQL Database Using Entra ID
Open Power BI Desktop:
- Go to Home > Get Data > Azure > Azure SQL Database.
Enter Server and Database Information:
- Provide the Server name and Database name.
Authentication Method:
- Select Microsoft Entra ID (formerly Azure AD) for authentication.
- Ensure you are signed in with the appropriate AD account.
Firewall Configuration:
- Ensure that your Azure SQL Database firewall settings allow access from Power BI Desktop. You might need to add your client IP address to the allowed list.
Best Practices for Security
Use Managed Identities:
- If possible, use managed identities for Azure resources to authenticate to Azure SQL Database. This approach eliminates the need to manage credentials manually.
Enable Single Sign-On (SSO):
- After publishing your report to the Power BI service, enable SSO for the data source. This ensures that the user’s AD credentials are used for database access1.
Use Private Endpoints:
- Configure private endpoints for your Azure SQL Database to ensure that traffic between your Power BI service and the database remains within the Azure network.
Alternative Approaches
Paginated Reports:
- While paginated reports require users to sign in, you can use Power BI Embedded to embed these reports in SharePoint or Teams. This approach provides a seamless experience without requiring additional sign-ins.
Power BI Service:
- If direct connection from Power BI service to Azure SQL Database is not feasible, consider using an On-premises Data Gateway. This allows you to connect securely to your database and run stored procedures.
If you need additional information pls go through below links
https://community.fabric.microsoft.com/t5/Desktop/Connect-to-Entra-ID-data/td-p/3516002
Thanks!
As a follow up, having got to the point of being able to create a PowerBI report connected to the data I needed using PowerBI Desktop, I still struggled to get a PowerBI report to work the way I wanted (I wanted to run a stored procedure with a default date of yesterday, but with the ability for the user to change the date parameter from the report without having to be trained on how to do this in a PowerBI report).
I have ended up embedding in to a PowerBI report, a PowerBI paginated report that is created off the stored procedure run with the default date of yesterday. Whilst the PowerBI paginated report won't embed in to a Sharepoint site viewed from Teams without requiring the user to open the report and sign-in, it is immediately viewable when embedded into the PowerBI report. The user has to open the report to change the variable, but this seems the best solution for my use case.