I wonder if it is possible to connect to an Azure SQL database with ActiveDirectoryInteractive authentication from Excel with Power Query?
Is there support for it and if so how would the connection string be like.
I have tried to connect with the following code, and with similar varieities:
cnString = _
"OLEDB;Provider=MSOLEDBSQL.1;Persist Security Info=True;Authentication=ActiveDirectoryInteractive;Data Source=SERVERNAME;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=True;Tag with column collation when possible=False;Initial Catalog=DATABASE;"
ThisWorkbook.Connections.Add2 _
Name:="NAME", _
Description:="", _
ConnectionString:=cnString, _
CommandText:="[TABLE]", _
lCmdtype:=XlCmdType.xlCmdTable, _
CreateModelConnection:=True, _
ImportRelationships:=False
I get the authentication prompt to authenticate with my AD account and it succeeds but then I still get the Excel native login prompt as in attahced image and then the connection fails.
So I wonder, is it even possible to connect with Azure AD Interactive authentication in this way?
And if so how?