How to proactively rotate or automate the secrets rotation for the Enterprise Application and Application Registration ?

EnterpriseArchitect 6,061 Reputation points
2025-07-07T14:06:19.3133333+00:00

We have a few thousand 3000+ Azure Enterprise Applications and Application Registrations that are still using Client secrets.

These are the steps that my SysAdmin must do regularly, one day before or when certain Applications are broken / not running (reactive):

  1. In Azure Portal, open the Certificates & secrets (https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/Credentials/appId/085843e2-a223-44d4-b6f6-dddb56493cab) page of app registration nwo_deploy
  2. Click Client secrets, and then click New client secret
  3. Enter secret details, making sure that the expiration time meets policy requirements. When finished, click Add
  4. Copy the secret value and update your application with the new credentials
  5. Before deleting the old secret, update and verify that your software is properly running with the new secret
  6. Delete the old secret

What is the best practice to avoid performing these manual steps every 180 days or so for thousands of Azure App Registrations in my Azure tenant?

Because most applications do not support SSL Certificates.

https://learn.microsoft.com/en-us/azure/key-vault/secrets/tutorial-rotation-dual?tabs=azurepowershell#use-existing-rotation-function-for-multiple-storage-accounts

Thank you.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
0 comments No comments
{count} votes

Accepted answer
  1. Swaroop Kolli 240 Reputation points Microsoft External Staff Moderator
    2025-07-09T10:34:38.8566667+00:00

    Hello @EnterpriseArchitect,

    Thank you for posting your query on Microsoft Q & A Forum.

    As per my understanding, you wanted to know the best practice to avoid performing manual rotation of the client secret values.

    Unfortunately, we cannot automatically renew a client secret for an app registration and admin should manually create a secret before expiration and update it in the application server.

    The document you are referring to rotate the secret is for internal function apps and storage accounts which can be directly linked to a key vault. This would rotate the client secrets, but these are for internal resources like VM's, function apps etc.

    We can link the app registration with Key Vault which would automatically renew the secret but updating this in the application server would be again a manual work.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query, please do let us know by commenting on this.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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