Reputation: 143
A bit farther along now.
I've done the following:
I am now trying to put this into a powershell script. I get a "Cannnot bind parameter Uri" error with my invoke-restmethod. I have successfully gotten my access token and this is the next step I am stuck at.
$Param = @{
Method = 'Get'
Uri = "https://management.azure.com/______/Microsoft.Consumption/usageDetails?..."
Body = @{
Authorization = $AccessToken
}
}
$Execute = Invoke-RestMethod $Param
Help?
Edit: changed Invoke-RestMethod $Param to @Param with a new error: code Authentication failed authorization header missing.
Upvotes: 0
Views: 138
Reputation: 143
Body should be Headers. Access Token Variable should have Bearer in front of it when using https://management.azure.com.
Upvotes: -1