How to Extend Azure Service Principle Secret Expiry Date

Copper Contributor

Hi,

 

I have one Service Principle Secret which is going to expire very soon. I am not sure what all places, it has been used.

Is there any way we can just extend the service principle Secret key without changing the secret.

 

What else I can do in case increasing the expiry date is not possible.

Any suggestion/guidance will be very helpful.

 

Regards,

Saurabh

2 Replies
Hi,

max. expiry time is 2 years when i'm not wrong and you can not even extend that timespan.
i would suggest to go ahead with Azure KeyVault and store the Secret there, maybe with Auto Upgrade. Makes it easier to manage it. unfortunatly, or maybe even not, you can not inplace extend or update secret. in the end it is also a security topic.

Kind Regards, Peter
Use the below powershell module to get the expiring SP:
Install-Module -Name AzAppRegistrationExpiry

+----------------+----------------------------------------------------------+
| Expiry | E.g : Get-ExpiringSPN -TimeFrameInDays 30 -expiry |
+----------------+----------------------------------------------------------+
| InvalidExpiry | E.g : Get-ExpiringSPN -TimeFrameInDays 30 -InvalidExpiry |
+----------------+----------------------------------------------------------+