I have installed an ODBC driver (system DSN) on a SQL server to connect to an external database. It uses SSL encryption. In SSMS I am able to query it using a linked server and openquery(). In C# code I can query it using a connection string with the DSN. Both of these methods fail when I schedule them as a job in SQL agent with the error message "Failed to decrypt data: Key not valid for use in specified state"
Do I need to grant permission to the SQL agent to be able to use this ODBC connection? How do I do that?