Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I am relatively new to power bi. We are creating a Customer Connector for Power BI Desktop. In the custom connector, we will be authenticating the Azure AD guest user. After authenticating the guest user, using that access token, we will call the AZURE SQL DB using the ODBC data source. Our issue here is passing the access token to the ODBC connection. We have tried multiple option but all are generating errors. Below are how we are building the ODBC connections.
CredentialConnectionString = if (Credential[AuthenticationKind]? = "OAuth") then ** [ database = "DB_Name", accesstoken = Credential[access_token] ] ** else error Error.Record("Error", "Unhandled authentication kind: " & Credential[AuthenticationKind]?), defaultConfig = Diagnostics.LogValue("BuildOdbcConfig", BuildOdbcConfig()), SqlCapabilities = Diagnostics.LogValue("SqlCapabilities_Options", defaultConfig[SqlCapabilities] & [ // Place custom overrides here // The values below are required for the SQL Native Client ODBC driver, but might // not be required for your data source. FractionalSecondsScale = 3 ]),
OdbcDatasource = Odbc.DataSource(ConnectionStringNoNulls, [ // A logical (true/false) that sets whether to view the tables grouped by their schema names
HierarchicalNavigation = true,
// Allows upconversion of numeric types
SoftNumbers = true,
// Allow upconversion / resizing of numeric and string types
TolerateConcatOverflow = true,
// Enables connection pooling via the system ODBC manager
ClientConnectionPooling = true,
// These values should be set by previous steps
CredentialConnectionString = CredentialConnectionString,
SqlCapabilities = SqlCapabilities,
SQLColumns = SQLColumns,
SQLGetInfo = SQLGetInfo,
SQLGetTypeInfo = SQLGetTypeInfo
])