@gisgeezer Dealing with cmdkey, especially with service accounts, it's bit hardness . I recommend, if possible, If you are using Active Directory to enable access to their file share. All they need to do is give their service account access via RBAC once AD is configured and they should be good.
Additional information: If you have a service which is authenticated using a domain-based service account on a Windows Server 2019 server. At logon a script runs which maps a drive to an Azure File Share on the server. However, while the share can be accessed via the full UNC path of the file share, it cannot be reached by the drive mapping. When logged in as an interactive user, the drive letter is fine. Customer wants to know if is it possible to access a drive mapping from a non-interactive service.
The following approaches that are better explained in these articles:
• https://techcommunity.microsoft.com/t5/itops-talk-blog/tips-amp-tricks-for-azure-file-shares/ba-p/277943
Access issues with an application or service account
If your application or service is running under a different user account than what the drive is mounted with, you may experience an issue where the application or service account cannot accessing the Azure file share. Some workarounds :
Mount the drive from the same user account that contains the application. You can use a tool such as PsExec.
Pass the storage account name and key in the user name and password parameters of the net use command.
Use the cmdkey command to add the credentials into Credential Manager. Perform this from a command line under the service account context, either through an interactive login or by using runas.
Map the share directly without using a mapped drive letter. Some applications may not reconnect to the drive letter properly, so using the full UNC path may be more reliable.
• https://blogs.iis.net/davidso/azurefile
• https://social.msdn.microsoft.com/Forums/en-US/b55aa80a-130b-4c7d-8d0f-0907a360a0a1/mount-azure-file-store-for-iis-application-pool
Hope this helps!
Kindly let us know if the above helps or you need further assistance on this issue.
Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.