With Azure Functions deploy, there should be separate parameters for password and password file.
e.g. if I use my 'mysecret.pem' file as password, and file cannot be found then deploy tries to use 'mysecret.pem' as literal password. Which naturally leads to invalid client secret error.
If I would use AZURE_PASSWORD_FILE: 'mysecret.pem' I would get a file missing error when file is missing.