I have a batch job on a (windows 10) machine that runs every night. A part of the job is to do a "tf get /login:[PAT]". This works for a couple of days after which it fails with "you are not authorized to access". Basically what happens is, after some days the PAT alone doesn't work anymore and the "password prompt" window gets displayed. As nobody is monitoring this job, nobody enters anything and the window times out after some time and tf access is denied.
If, after the failure, i run this job manually and enter the correct credentials into the login window (and also authorize the access on my phone, because the underlying account is protected by 2fa), everything starts working again, for a couple of days.
What do i need to do in order to make this run w/o the need for a manual intervention?