If you’re developing Azure Functions, it may happen that you encounter this error :
Failed to decrypt settings. Encrypted settings only be edited through 'func settings add'.
That often means that there’s an issue with your local.settings.json file. There are different ways that people might use to circumvent this error but I found for me that doing the following works everytime I have this error.
- Open Windows Terminal or any command line tool
- Go to your Azure function project path
- Execute the following command “func settings encrypt”
- Then execute the following “func settings decrypt”.
That should do the trick. Let me know if that worked for you.
Happy fixing