I have a bash script vault.sh
az login
Source_Kv_Name="myKeyVault2020"
SECRETS+=($(az keyvault secret list --vault-name $Source_Kv_Name --query "[].id" -o tsv))
If I run it as bash vault.sh
it fails to connect to vault (authenticate)
If I run the same commands from terminal, not the script, it works fine. Why is happening, and how do I authenticate bash script to run the same?