In this step, we will assign the Enrollment Reader role to the app created in Step 1. This role grants read access to enrollment information and cost reports. It's important to note that the Enrollment Reader role DOES NOT provide any WRITE permissions to the Mavvrik platform.
Why this matters: Mavvrik only ever needs read access to generate cost data and recommendations; it never writes to your Azure account. A read-only role keeps the integration's blast radius limited if credentials were ever compromised.
-
GCC High onboards at the EA enrollment (billing account) scope only. The subscription scope is not available for this account type.
-
Unlike the MCA/MPA account type, the role is assigned using the Azure API, not the Access control (IAM) page. EA roles for an app (service principal) are created programmatically and are not shown in the Azure portal.
The Mavvrik app registration is checked for the following access when the billing account is connected:
-
Cost Management query
-
Cost Details report
-
billingSubscriptions listing (required for GCC High; Mavvrik uses it to discover the usage accounts)
Before you start
-
Sign in with a user who has the Enrollment writer role on the enrollment. This is required to assign the Enrollment Reader role.
-
Have these values ready:
-
Enrollment number (billing account ID). See GCC High Step 3: Retrieve Account ID.
-
Directory (tenant) ID from Step 1.
-
Enterprise application Object ID of the app from Step 1.
-
Use the Object ID from Enterprise applications, not the Object ID shown under App registrations. The two IDs are different. If the wrong one is used, the request fails with the error The provided principal Tenant Id and principal Object Id are not valid.
Find the Enterprise application Object ID
-
In the Azure Government portal, open App registrations and click the app you created in Step 1.
-
On the Overview page, under Managed application in local directory, click the app name. This opens the app under Enterprise applications.
-
Copy the Object ID.
Assign the Enrollment Reader role
Run the request from Azure Cloud Shell in the Azure Government portal, which signs the request for you. Calling the Azure Government endpoint from a tool such as Postman fails unless you build the authentication header yourself.
-
In the Azure Government portal, click the Cloud Shell icon in the top bar and choose Bash.
-
Generate a new GUID to use as the role assignment name:
Bashuuidgen -
Run the following command after replacing the placeholders:
Bashaz rest --method put \ --url "https://management.usgovcloudapi.net/providers/Microsoft.Billing/billingAccounts/<ENROLLMENT_NUMBER>/billingRoleAssignments/<NEW_GUID>?api-version=2019-10-01-preview" \ --body '{"properties":{"principalId":"<ENTERPRISE_APP_OBJECT_ID>","principalTenantId":"<TENANT_ID>","roleDefinitionId":"/providers/Microsoft.Billing/billingAccounts/<ENROLLMENT_NUMBER>/billingRoleDefinitions/24f8edb6-1668-4659-b5e2-40bb5f3a7d7e"}}'
|
Placeholder |
Value |
|---|---|
|
<ENROLLMENT_NUMBER> |
Your EA enrollment number (billing account ID) |
|
<NEW_GUID> |
The GUID generated in the previous step |
|
<ENTERPRISE_APP_OBJECT_ID> |
Object ID of the app under Enterprise applications |
|
<TENANT_ID> |
Directory (tenant) ID from Step 1 |
24f8edb6-1668-4659-b5e2-40bb5f3a7d7e is the Azure role definition ID for Enrollment Reader.
A successful request returns a 200 OK response with the new role assignment as JSON. A service principal can have only one EA role, and the role assignment is not visible in the Azure portal.
Procedure in this step is also documented by Azure here: assign-roles-azure-service-principals. That article uses management.azure.com. For Azure Government, use the management.usgovcloudapi.net endpoint.