Azure Service Principals have an expiration date by default and have the need to be rotated.
But is there a way to invalidate or force expiry of a service principal?
Azure Service Principals have an expiration date by default and have the need to be rotated.
But is there a way to invalidate or force expiry of a service principal?
The credentials used when a service principal authenticates can be stored either on the service principal itself, or on the backing application object (i.e. the "app registration").
Changing the expiration date of an existing credential is not currently supported. If you wish to disable a credential, you should delete it. (If you wish to re-enable it, you can simply add it back in as an authorized credential.)
Remove a credential from an application (app registration)
Using the Azure portal
Navigate to Azure Active Directory > App registrations > (choose the app) > Certificates & secrets
Next to any certificate or client secret, choose the "Delete" icon (️)
Using Azure AD PowerShell
To remove a key credential (certificate):
To remove a password credential (client secret):
Using Microsoft Graph
To remove a key credential (certificate):
To remove a password credential (client secret):
Remove a credential from a service principal
Using the Azure portal
It is not currently possible to use the Azure portal to manage credentials stored directly on the service principal.
Using Azure AD PowerShell
To remove a key credential (certificate):
To remove a password credential (client secret):
Using Microsoft Graph
To remove a key credential (certificate):
To remove a password credential (client secret):