共用方式為


Connect from Power BI to Azure SQL Database using AAD authentication

Currently Power BI doesn’t support AAD authentication when connecting to Azure SQL Database, but using Microsoft ODBC Driver 13 it is possible to do it.

You can download the driver from here (ODBC Driver 13.1) and install it.

After installing the driver, you can connect to the Azure SQL using ODBC connector.

1

Select ODBC and introduce the connection string that should have the following format:

Driver={ODBC Driver 13 for SQL Server};Server=tcp: <Server Name > ,1433;Database=<Database name>;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword

2

You will be requested to introduce the user and password for the database.

3

You can find more information about AAD authentication and users here.

Now you are ready to build your report and publish it to the Power BI Service.

If you want to keep your data updated on the Power BI Service you will need to use the Power BI Gateway.   

For using the Gateway you need to add the Data Source on the Mange Gateways menu.

4

For the connection string use the same connection string as in the Power BI Desktop file:

Driver={ODBC Driver 13 for SQL Server};Server=tcp: <Server Name > ,1433;Database= <Database name>;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword

Now you will be able to select the gateway and perform the refresh.

 

Beatriz García

@BeRoces