It's possible to connect to an azure sql server database xxxx.database.windows.net, using a SPN (already created one in my Azure subscription that I use successfully in ADF).
My goal is to avoid SQL Authentication (that I use at the moment with RODBC::odbcDriverConnect), and avoid 2FA, since R code will run automatically in remote machines.
Right now I use:
con <- RODBC::odbcDriverConnect('driver={SQL Server};server=XXX.database.windows.net;database=XXX;Uid=XXX;Pwd=XXX!')
Thanks community.
Already tried create a ODBC DSN, but couldn't connect using SPN option.
I can't speak for using R or the RODBC library but this is certainly possible in .NET. Although the following relates to .NET I'm hopeful that there should be enough in common for it to be of help to you, and you can port the second step to using R/RODBC: