Adding a Reader Role for Azure Reservation Orders
search cancel

Adding a Reader Role for Azure Reservation Orders

book

Article ID: 283979

calendar_today

Updated On: 12-25-2024

Products

CloudHealth

Issue/Introduction

The steps below outline how to add a Reader Role for Azure Reservation Orders, either using the Azure Portal or PowerShell.

Resolution

Currently, we only support deriving Reservation Orders from Enrollment Agreement (EA) billing data.

For other subscription types, please follow the below steps to add the Reader role manually:

Option 1: Azure Portal

1. Navigate to Reservations under Azure Portal:
https://portal.azure.com/#blade/Microsoft_Azure_Reservations/ReservationsBrowseBlade 


2. Select the Reservation and click on the Reservation Order ID hyperlink


3. Add the Reader Role for the CloudHealth Service Principal



4. Make sure Reservations under the Reservation Order are inheriting the permission

 

Option 2: Azure Powershell​​

Run the following PowerShell command in Azure CloudShell by replacing the <Enter_App_Id> with your Service Principal Application Id.

$AppId= "<Enter_App_Id>"
$ROids = (Get-AzReservationOrder).id
ForEach ($roid in $roids)
{
New-AzRoleAssignment -Scope $roid -RoleDefinitionName "Reader" -ApplicationId $AppId
}

The reservation assets report will be populated once the reader roles are properly applied to all reservation orders and inherited by their related reservations.