From 411028c1619f9ccb72ebdd9bf4672c1f64eef347 Mon Sep 17 00:00:00 2001 From: Sander Rozemuller <43162899+srozemuller@users.noreply.github.com> Date: Thu, 30 May 2024 15:17:12 +0200 Subject: [PATCH] Update run.ps1 --- Security-BreakGlassCertRenewer/run.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Security-BreakGlassCertRenewer/run.ps1 b/Security-BreakGlassCertRenewer/run.ps1 index 23821c4..2ffb4de 100644 --- a/Security-BreakGlassCertRenewer/run.ps1 +++ b/Security-BreakGlassCertRenewer/run.ps1 @@ -6,8 +6,6 @@ $informationPreference = 'Continue' # Write an information log with the current time. Write-Output "PowerShell timer trigger function ran! TIME: $currentTime" # Connect to Azure using the system assigned identity -# Disconnect first to make sure we use fresh credentials -Disconnect-AzAccount Connect-AzAccount -Identity $ProgressPreference = "SilentlyContinue" @@ -35,7 +33,7 @@ catch { try { Write-Information "Searching for certificates in key vault" -InformationAction Continue $breakglassCertificateUrl = "{0}/certificates/{1}?api-version=7.4&maxresults=25&_=1714746115235" -f $env:KEYVAULT_URL, $env:BREAKGLASS_CERTNAME - # $results = Invoke-RestMethod -Uri $breakglassCertificateUrl -Headers $keyvaultHeaders -Method Get + $results = Invoke-RestMethod -Uri $breakglassCertificateUrl -Headers $keyvaultHeaders -Method Get } catch { Throw "Unable to request certificates, $_"