@EnterpriseArchitect The script above I assumes you are using the storage account key instead of AD credentials. For users using AD they don’t need to save the password, it will connect on login automatically.
Full instructions and a video here: https://learn.microsoft.com/en-us/azure/storage/files/storage-files-identity-auth-active-directory-enable
Hope this helps!
Kindly let us know if the above helps or you need further assistance on this issue.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.