Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
| 2025-07-12 00:58 | #8 | cancelled |
Clean
|
| 2025-07-10 05:06 | #7 | processing |
Clean
|
Import-Module Az.Accounts Import-Module Az.Resources Connect-AzAccount -Tenant <TenantId> New-AzRoleAssignment -Scope "/providers/Microsoft.BillingBenefits" -PrincipalId <ObjectId> -RoleDefinitionName "Savings plan Administrator"
Import-Module Az.Accounts Import-Module Az.Resources Connect-AzAccount -Tenant <TenantId> New-AzRoleAssignment -Scope "/providers/Microsoft.BillingBenefits" -PrincipalId <ObjectId> -RoleDefinitionName "Savings plan Reader"
Import-Module Az.Accounts
Import-Module Az.Resources
Connect-AzAccount -Tenant <TenantId>
$response = Invoke-AzRestMethod -Path /providers/Microsoft.BillingBenefits/savingsPlans?api-version=2022-11-01 -Method GET
$responseJSON = $response.Content | ConvertFrom-JSON
$savingsPlanObjects = $responseJSON.value
foreach ($savingsPlan in $savingsPlanObjects)
{
$savingsPlanOrderId = $savingsPlan.id.substring(0, 84)
Write-Host "Assigning Owner role assignment to "$savingsPlanOrderId
New-AzRoleAssignment -Scope $savingsPlanOrderId -ObjectId <ObjectId> -RoleDefinitionName Owner
}
Import-Module Az.Accounts Import-Module Az.Resources Connect-AzAccount -Tenant <TenantId> New-AzRoleAssignment -Scope "/providers/Microsoft.BillingBenefits" -PrincipalId <ObjectId> -RoleDefinitionName "Savings plan Administrator"
Import-Module Az.Accounts Import-Module Az.Resources Connect-AzAccount -Tenant <TenantId> New-AzRoleAssignment -Scope "/providers/Microsoft.BillingBenefits" -PrincipalId <ObjectId> -RoleDefinitionName "Savings plan Contributor"
Import-Module Az.Accounts Import-Module Az.Resources Connect-AzAccount -Tenant <TenantId> New-AzRoleAssignment -Scope "/providers/Microsoft.BillingBenefits" -PrincipalId <ObjectId> -RoleDefinitionName "Savings plan Reader"
Import-Module Az.Accounts
Import-Module Az.Resources
Connect-AzAccount -Tenant <TenantId>
$response = Invoke-AzRestMethod -Path /providers/Microsoft.BillingBenefits/savingsPlans?api-version=2022-11-01 -Method GET
$responseJSON = $response.Content | ConvertFrom-JSON
$savingsPlanObjects = $responseJSON.value
foreach ($savingsPlan in $savingsPlanObjects)
{
$savingsPlanOrderId = $savingsPlan.id.substring(0, 84)
Write-Host "Assigning Owner role assignment to "$savingsPlanOrderId
New-AzRoleAssignment -Scope $savingsPlanOrderId -ObjectId <ObjectId> -RoleDefinitionName Owner
}
Import-Module Az.Accounts Import-Module Az.Resources Connect-AzAccount -Tenant <TenantId> New-AzRoleAssignment -Scope "/providers/Microsoft.BillingBenefits" -PrincipalId <ObjectId> -RoleDefinitionName "Savings plan Contributor"