Closed dcbrown16 closed 5 years ago
Hi @dcbrown16 Thank you for your feedback! We will review and provide an update as appropriate.
@bobbytreed Can you please look into this request?
Sure, I will see if we can get a sample script added.
To renew automatically please use https://github.com/ikanni/PowerShellScripts/blob/master/AzureAutomation/RunAsAccount/GrantPermissionToRunAsAccountAADApplication-ToRenewCertificateItself-CreateSchedule.ps1
GrantPermissionToRunAsAccountAADApplication-ToRenewCertificateItself-CreateSchedule.ps1 script will automate all operations mentioned in Update-AutomationRunAsCredential.ps1 documentation and create a weekly schedule to renew RunAsAccount certificate.
Once you execute the GrantPermissionToRunAsAccountAADApplication-ToRenewCertificateItself-CreateSchedule.ps1 script, you will find a Update-AutomationRunAsCredential runbook in your automation account. To test the renewal process immediately, please open the Update-AutomationRunAsCredential runbook and comment line 122 and start the runbook. Please remember to rollback this change.
Only constraint is the user executing GrantPermissionToRunAsAccountAADApplication-ToRenewCertificateItself-CreateSchedule.ps1 need to be a Global Administrator / Company Administrator in Azure AD.
Known issues: The above script failed with old automation accounts and we need to check with AAD team on that.
Let us know if you run into any issues.
Thanks @ikanni and @bobbytreed !
Many businesses would prefer to detect upcoming certificate expirations and renew automatically, rather than go into the Portal for renewal. What PowerShell commands would renew the certificate for your RunAs account, so you can automate that (using Automation itself)?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.