We are exploring Azure SQL Auditing capabilities. It gives us a list of all the queries executed and some additional data which is good.
However, field server_principal_name
is always reflecting a SQL username that is provided in a connection string. And it is always the same value - whatever was in the connection string.
We are running ASP.Net MVC application with Entity Framework for data access and there is a single connection string for the database, but there are multiple application users. It would be beneficial if we could see username of application user in audit rather than username of SQL user from connection string.
So my question - is it possible to pass parameters into Audit log in Azure SQL?
There is similarly looking question, but talking about DML, hostnames and IP. Answers seem to be saying "NO", but question is slightly different. Anybody can confirm that what I'm trying to do is (im)possible?