To get the billing data for Azure in OpsRamp portal, you need to enable the Rate Card API to calculate an estimate for your Azure spend. This will help you to monitor the spending over a period from the OpsRamp portal.

Step 1: Enable API

To enable the Rate Card API:

  1. Log in to the Azure portal.
  2. From the left-hand side navigation menu, click Subscriptions.
  3. Select the subscription that you want to enable the Microsoft Cost Management API.
  4. From the left-hand side navigation menu, click Resource providers.
  5. Search for Microsoft.CostManagement in the list of resource providers. If the status of the provider is Not Registered, you need to register the provider.
  6. Select the provider and click the Register button to register.

This will allow you to use the Azure Cost Management APIs and SDKs to manage and retrieve the cost-related data for your resources.

Perform below steps in the Azure portal to check the role assignments for a service principal and ensure it has the necessary permissions for cost management operations:

  1. Log in to the Azure portal.
  2. Select Azure Active Directory from the left-hand menu and navigate to Azure Active Directory page.
  3. In the Azure Active Directory page, select Enterprise applications from the left-hand menu.
  4. Search for the name or the application ID of the service principal associated with the provided credentials.
  5. Once you find the service principal in the list, click the service principal to select it.
  6. In the Service Principal overview page, click Users and groups option in the left-hand menu.
  7. In the Users and groups page, you will see the list of users and groups assigned to the service principal.
  8. Review the assigned users and groups to ensure the appropriate individuals or groups have access.
  9. To check the role assignments for the service principal, click the Roles and administrators option in the left-hand menu.
  10. In the Roles and administrators page, you will see the list of role assignments for the service principal.
  11. Review the role assignments to verify if the service principal has the Cost Management Operator or Cost Management Reader role assigned.
  12. If the desired role assignments are missing, you can click Add assignments button to assign the appropriate roles.
  13. In the Add assignments page, search for the desired roles (for example, “Cost Management Operator” or “Cost Management Reader”) and select them.
  14. Specify the desired users, groups, or service principals to assign the roles to.
  15. Click ADD button to assign the roles.

By following the above steps, you can check the role assignments for a service principal in the Azure portal and ensure it has the necessary permissions for cost management operations. Make sure to assign the appropriate roles to the service principal to grant the desired level of access to Azure resources.

Step 2: Get Offer ID

Once the Rate Card API is enabled, you need to find the Azure billing Offer ID in the Azure portal so that the Offer ID can be used to configure in the OpsRamp portal.

To find the Azure billing Offer ID:

  1. Log in to the Azure portal.
  2. Navigate to the Subscriptions page.
  3. Click Overview from the left-hand side menu.
  4. On the Overview page, you can find the offer name under Plan as shown below:

Note: You can find the offer ID based on the offer name in this below link: - Microsoft Azure Offer Details.

For example, the Offer ID for Azure Plan is MS-AZR-0017G. The MS-AZR indicates the name which is common for all Offer IDs. The ID 0017G varies based on your requirements.

OpsRamp Configuration

After you get the Offer ID from Azure portal, you need to set the offer ID in OpsRamp.

To set the Offer ID:

  1. Log in to the OpsRamp portal.
  2. Click All Clients. From the drop-down list, select a client.
  3. Go to Setup > Integrations and Apps > Integrations.
  4. Click on Azure integration and go to the discovery profile.
  5. Select the Collect Cost Analytics checkbox under Perform Actions.
  1. Enter the Azure billing Offer ID generated in the Azure portal.
  2. Click Update.
    The configuration is successfully created.