Share via

Flex Consumption Function App is autorenewing App Keys

J 0 Reputation points
2026-02-02T09:29:06.1633333+00:00

We recently migrated an existing Python Function App from a consumption plan to the new flex consumption plan. Storage location of the old app was reused for convenience and all custom app keys on host and function level were migrated.

Since the migration, all our app keys seem to get auto-renewed about every 48h, locking out all of our users until we manually reset the keys.

Out of this, there's now multiple questions:

  1. Why do my app keys get auto-rotated?
  2. How do I turn this off?
  3. I now reconfigured my function app to use app keys stored in a KeyVault. Will this solve the auto-renewal issue?

Thanks and cheers,

J

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


2 answers

Sort by: Most helpful
  1. Sanjit Patel 0 Reputation points
    2026-05-07T20:24:54.32+00:00

    I had a function app on a flex consumption plan with the same symptoms. However, in my situation, the storage container had a lifecycle mgmt rule to delete blobs older than 7 days. I added a filter to select the specific folders to delete

    0 comments No comments

  2. J 0 Reputation points
    2026-02-09T07:53:42.3533333+00:00

    Answering my own question now:

    1. I still don't know...Probably a side-effect of reusing the storage account from my previous azure function and some lingering artifacts. I would recommend to either start on a clean storage account or check manually that all data relating to the function has been deleted from the storage account before creating a new function where there already has been one before.
    2. Automated key rotation with keys stored on the function app storage account is not a feature that exists, so logically there's no option to turn it off.
    3. Switching to the key vault did solve the problem. The keys have been stable since then.

    Beware of the AI generated answers with their "have you tried resetting your computer" vibe. Half of the info up there is misleading ("Azure Functions maintain a level of security by rotating keys periodically"s...no they don't) or contradicting ("there isn't a direct option to disable key rotation in Azure Functions" vs. "Investigate Key Animation Settings: Check the Azure documentation for any specific settings related to key management in your current Flex Consumption environment.")

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.