When creating a Azure DevOps service connection of type Azure Resource Manager
that uses authentication method service principal (automatic)
, a service principal and a app registration get created in the corresponding Azure tenant. Furthermore a client secret gets added to the app registration for the service connection. Unfortunately the client secret expires after two years and there is currently no way to change the expiration of automatically created client secrets. However there is a pretty straight forward way to renew the client secret for such a service connection.
Prerequisites
- Current user has to be a member of the Azure AD built-in role
Application Developer
- Current user has to be an owner of the service connections app registration in Azure
- Current user has to be a organization level administrator of the corresponding service connection
- Open Project settings of the corresponding project in Azure DevOps
- Navigate to Service connections
- Click on the affected service connection
- Click on the three dots right to the
Edit
button and selectSecurity
- Switch to
Organization
and add make sure your user is in roleAdministrator


For details concerning the reason for being a organization level administrator see here.
If all prerequisites are fulfilled, proceed as follows to renew the client secret:
- Open
Project settings
of the corresponding project in Azure DevOps - Navigate to
Service connections
- Click on the affected service connection
- Click
Edit
button - Click
Verify
in theEdit service connection
wizard - After successful verification click
Save
Leave a Reply