Skip to content

Commit

Permalink
Accounted for upcoming breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSehr committed Jul 25, 2024
1 parent d25ccbc commit 58dbaaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function Clear-ManagementGroupDeploymentHistory {
Method = 'GET'
Uri = "https://management.azure.com/providers/Microsoft.Management/managementGroups/$ManagementGroupId/providers/Microsoft.Resources/deployments/?api-version=2021-04-01"
Headers = @{
Authorization = 'Bearer {0}' -f (Get-AzAccessToken).Token
Authorization = 'Bearer {0}' -f ((Get-AzAccessToken -AsSecureString).Token | ConvertFrom-SecureString -AsPlainText)
}
}
$response = Invoke-RestMethod @getInputObject
Expand Down Expand Up @@ -103,7 +103,7 @@ function Clear-ManagementGroupDeploymentHistory {
Method = 'POST'
Uri = 'https://management.azure.com/batch?api-version=2020-06-01'
Headers = @{
Authorization = 'Bearer {0}' -f (Get-AzAccessToken).Token
Authorization = 'Bearer {0}' -f ((Get-AzAccessToken -AsSecureString).Token | ConvertFrom-SecureString -AsPlainText)
'Content-Type' = 'application/json'
}
Body = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function Clear-SubscriptionDeploymentHistory {
Method = 'GET'
Uri = "https://management.azure.com/subscriptions/$subscriptionId/providers/Microsoft.Resources/deployments?api-version=2020-06-01"
Headers = @{
Authorization = 'Bearer {0}' -f (Get-AzAccessToken).Token
Authorization = 'Bearer {0}' -f ((Get-AzAccessToken -AsSecureString).Token | ConvertFrom-SecureString -AsPlainText)
}
}
$response = Invoke-RestMethod @getInputObject
Expand Down Expand Up @@ -107,7 +107,7 @@ function Clear-SubscriptionDeploymentHistory {
Method = 'POST'
Uri = 'https://management.azure.com/batch?api-version=2020-06-01'
Headers = @{
Authorization = 'Bearer {0}' -f (Get-AzAccessToken).Token
Authorization = 'Bearer {0}' -f ((Get-AzAccessToken -AsSecureString).Token | ConvertFrom-SecureString -AsPlainText)
'Content-Type' = 'application/json'
}
Body = @{
Expand Down

0 comments on commit 58dbaaf

Please sign in to comment.