Add the Enrollment Reader role to the Microsoft Azure service principal
Assign the Enrollment Reader role to the Azure service principal for your Enterprise Agreement (EA) account to retrieve billing, purchase, and pricing data. You can assign this role using a Microsoft API.
Before you begin
Role required: Enterprise administrator
About this task
Enrollment reader roles can view subscription charges related data at the enrollment, department, and account scopes. They can also view the Azure prepayment balance linked with the enrollment. Enrollment reader role is required only for EA accounts.
Procedure
Navigate to the Role Assignments - Put page in the Microsoft Azure documentation.
Run the API by selecting the Try It button.
Select Sign in.
On the login page, enter your Microsoft Azure account credentials to sign in to the tenant.
On the API request parameters form, fill in the fields.
| Field | Description |
|---|---|
| billingAccountName | The Azure EA billing account ID.You can find the billing account ID on the Azure portal on the Cost Management + Billing overview page. |
| billingRoleAssignmentName | A unique ID to identify the name of the role that you want to assign.You can use a GUID generator website to generate a unique ID. |
| Body | The request body with parameters in JSON code. Enter the following JSON code in the body. In this code:
Important: Replace only the |
**Note:** You must not change the values in the **api-version** and **Content-Type** fields.
- Complete the role assignment for the Azure EA account by selecting Run.
What to do next
Schedule and manage the jobs that download Azure billing data