I am having an issue whereby I have a SQL Server Agent job that has a step that needs to execute as a particular user (for which I have set up credentials and a proxy in SQL Server). This user has details in their profile that need to be accessed by the job.
The job executes fine, but does not find the details in the user profile. I created a small bat script to debug and can see that the user is logged in OK (using whoami), but the %USERPROFILE% variable is set to "Default User". This does not happen when the required user is logged in to the machine at the time of execution.
Is there some configuration or security setting I am missing?
any help is much appreciated.