There’s a nice bug with azure functions where it reports the environment it’s running in as “development” when it should be “production”, which means the app uses the wrong settings.
Nothing in the documentation to mention this, you just need to deploy and learn from your mistakes!