It sounds like you deployed the Connected Machine Agent via a script using a service principal, correct? The client secret is just for initial registration of the agent so your machines will continue checking into Azure Arc after the expiration. Your script however will need an updated client secret in order to register agents after the current client secret expires. To generate a new client secret:
- In the Azure portal, go to App registrations -> All applications
- Search for the ServicePrincipalID used in your script and click on the result
- Click Certificates & Secrets -> New client secret
- Set your expiration
- Click Add
- Update your script with the new client secret