For me, the issue was that I was referencing Key Vault Secrets in my local.settings.json file and I had not logged in with the correct user with az login before running my function. Logging in through az login with a user that had Secrets Get permission on the Key Vault resolved the problem for me. I also tried reinstalling azure-function-core-tools and AzureFunctionTools as per DA's response above so it may have been a combination