Skip to content

Commit

Permalink
Update run.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
srozemuller committed May 30, 2024
1 parent cbedf41 commit b51daef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Security-BreakGlassCertRenewer/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ $graphHeader = @{
'Content-Type' = 'application/json'
Authorization = "Bearer {0}" -f $graphToken.token
}
#Obtain AccessToken for Microsoft Graph via the Managed Identity
$resourceURL = "https://graph.microsoft.com/"
$response = [System.Text.Encoding]::Default.GetString((Invoke-WebRequest -UseBasicParsing -Uri "$($env:IDENTITY_ENDPOINT)?resource=$resourceURL" -Method 'GET' -Headers @{'X-IDENTITY-HEADER' = "$env:IDENTITY_HEADER"; 'Metadata' = 'True'}).RawContentStream.ToArray()) | ConvertFrom-Json
$response.access_token

$graphToken.token
try {
import-module .\Modules\mem-monitor-functions.psm1
}
Expand Down

0 comments on commit b51daef

Please sign in to comment.