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

Step 1: Enable API

To enable the Cost Management 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.CostManagement 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 the 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 the 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 the 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 the 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.

OpsRamp Configuration

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

To set the Offer ID:

  1. Log in to the OpsRamp portal.
  2. Navigate to Setup > Account.
  3. Click on the Integrations and Apps tile.
  4. Search for Azure. Also you can use the All Categories dropdown list to search.
  5. Select the Azure tile.
  6. Click the menu option for the profile and click Edit..
  7. In the Options tab, select the Collect Cost Analytics checkbox.
  8. Click Save.
    The configuration is successfully created.