for linux hosted azure functions, you can mount azure file storage as a local file:
https://learn.microsoft.com/en-us/azure/azure-functions/storage-considerations
for windows hosted azure functions, you use UNC filename (network file).
neither will solve your issue. your api seems to use the users profile to determine the location. this probably means the application needs to run under a logged in user and may actually require an active window. you might be able to get to run under a service with profile loaded.
You should create a simple command line program and try to get it to run as a service. if you get this to run, then you can run an asp.net core website as a service. if this doesn't work, then configure the server for kiosk mode, and have the program auto start. if you need azure hosted, then you will need a virtual machine.