I have a script which pushes a CSV to the Enterprise Portal to update the existing item.
The whole process is launched from the Windows Task Scheduler located on a shared computer. The computer is accessed remotely by many members of the team, each logging in with their own user names and passwords. The script is set up to use the ArcGIS API and the current method of authentication is gis=GIS("home"), which I believe uses the credentials of the current ArcPro session.
I have noticed that the process fails after two weeks, which I believe is when the access token generated by the ArcPro session expires. I have no need to log into the shared computer regularly, and it is the only machine with Pro installed locally. Ideally I would not have to remote in to the computer and open ArcPro every two weeks in order to generate a new token, for my process to run as scheduled.
Is there a more effective method of passing authentication? Potentially something that can run indefinitely without a token expiring? I am looking for a security conscious solution, without having to store username or password in the script.
Thoughts are greatly appreciated!