Failed to Rotate Secrets in LCS? Here’s What to Do Next

Introduction

Working with Lifecycle Services (LCS) may feel a bit outdated as we prepare for its eventual phase-out, but the reality is that many businesses still rely on it daily.
Recently, I encountered an issue while deploying to a new environment after a long break; it kept failing without a clear cause.


 
After investigating, I discovered the SSL certificate was the culprit, which I’d run into before (I’ve shared that experience in a previous post).
Naturally, I tried rotating the secrets from LCS, but it failed repeatedly without any error message or explanation.

 
I was ready to raise a ticket with Microsoft when Copilot stepped in with a suggestion that helped me quickly resolve the problem.

Here's what happened and how you can fix it if you face the same issue.

What to do:

Go into your development VM and search for certificates.




You'll see there's a certificate with the same name as your VM and if you observe the "Expiration Date" it is past your current date.
This is the reason the certificate rotation is failing.

Microsoft offers a simple script that can be used to generate another certificate to replace this.

Go to "Shared Asset Library" in LCS.
Scroll down to "Renew WinRM Certificate" and download it.


Move the downloaded zip into your Development VM and extract it.


Right click on "RenewWinRMCertificate" file and click on "Edit" to edit it in Windows ISE.


Once this is completed, go back to the Certificates and refresh the page.
You'll see there's another entry with the VM name and a different expiration date.
At this point, you can delete the old certificate.


After this, go to LCS and restart your development environment.
That's it!

Now you can try to rotate your certificate from LCS.


And now I can finally get back to my development work!


Conclusion

LCS might be on its way out, but for now, it’s still a big part of many businesses’ workflows.
Running into deployment failures because of an expired SSL certificate was a frustrating experience, but fixing it turned out to be pretty straightforward.
After checking the certificates, running Microsoft’s "Renew WinRM Certificate" script, and restarting the environment, I was able to rotate the secrets without a hitch. 
If you ever find yourself in the same boat, start by checking your certificates, it’s a quick step that can save you a lot of stress!

Comments

Popular posts from this blog

Actionable Error Messages in Business Central

Using Notifications in Business Central via AL

Configure Gmail SMTP service in Business Central without "Allow Less Secure" setting