VBA Connection string from Excel to Azure Serverless SQL Pool using Microsoft Account (Azure AD)

Renato de Melo 125 Reputation points
2024-03-07T21:05:59.2933333+00:00

I need to connect Excel to Azure Serveless SQL Pool (SSQLP). Once a user opens the spreadsheet, I will refresh data from SSQLP considering the authenticated user. What is the format of the connection string, considering the Excel/Windows authenticated user for this scenario? I will not provide password, neither user id in the connection string. It needs to use single-sign-on.

I appreciate any help.

Regards,

Renato de Melo

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
Microsoft 365 and Office Development Other
{count} votes

1 answer

Sort by: Most helpful
  1. Bhargava-MSFT 31,261 Reputation points Microsoft Employee Moderator
    2024-03-19T20:19:08.22+00:00

    Not sure if you have seen the below thread

    https://stackoverflow.com/questions/70686239/vba-connect-to-dbname-ondemand-sql-azuresynapse-net

    You can try the below connection string format.

    Provider=MSOLEDBSQL;Data Source=myServer;Initial Catalog=myDatabase;Authentication=ActiveDirectoryInteractive;User ID=myUserName;Use Encryption for Data=true;

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.