I'm trying to create user accounts in a database that's being created in an Azure DevOps deployment pipeline.
I have a service principal assigned as the Azure AD Admin for the database server. I'm now attempting to log in to the database using that service principal so that I can create the necessary user accounts.
Looking at the documentation here it seems as though only the 'go' version of sqlcmd supports connecting using a service principal, but the Azure DevOps Linux agent only has the 'odbc' version of sqlcmd installed.
I really don't want to have to deal with the inefficiency and fragility of having to install additional tools on the build agent for every run.
How can I run SQL queries on an Azure SQL database from a build agent using a service principal?
I'm pretty sure I can do it easily enough using SQL authentication, but apparently that's not best practice anymore.
SQL logins can't be used to create AD logins, so that won't work anyway.