Azure Resource Graph to retrieve Cost Recommendation with Resource ID and Part Number for both Current and Target SKU

51621659 1 Reputation point
2025-11-21T16:37:45.4833333+00:00

Is there a way to join the advisor resources securityresources

microsoft.advisor/recommendations

with the Resource Part Number so we can easily obtain our EA pricing?

Thank you,

Azure Advisor
Azure Advisor
An Azure personalized recommendation engine that helps users follow best practices to optimize Azure deployments.
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-21T16:38:06.81+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To join Azure Advisor resources with security resources in Azure Resource Graph, you can use the join operator in your queries. The microsoft.advisor/recommendations resource type can be joined with the securityResources table to retrieve relevant information, including the Resource ID and Part Number, which may help in obtaining your EA pricing.

    Here’s a basic example of how you might structure your query:

    AdvisorResources
    | join kind=inner SecurityResources on $left.resourceId == $right.resourceId
    | project $left.resourceId, $left.partNumber, $right.currentSku, $right.targetSku
    

    This query joins the AdvisorResources with SecurityResources on the resourceId, allowing you to access both the current and target SKU information along with the resource part number. Adjust the fields in the project clause as necessary to fit your specific needs.

    Keep in mind that the actual structure of your query may vary based on your specific requirements and the data available in your Azure environment.


  2. Siva shunmugam Nadessin 3,025 Reputation points Microsoft External Staff Moderator
    2025-12-03T03:56:46.38+00:00

    Hello 51621659,

    You’re absolutely correct—the SKU in the EA price list does not match the Current or Target SKU IDs from Advisor recommendations. This is a common challenge because:

    • Advisor extended properties use Azure Resource Manager SKU names (e.g., Standard_DS2_v2).
    • EA price sheet uses Part Numbers tied to billing SKUs, which are different from ARM SKUs.

    To bridge this gap, you need an intermediate mapping between ARM SKU names and EA Part Numbers. Microsoft does not expose this mapping in Resource Graph or Advisor APIs, but here are the options:

    Option 1: Use Azure Retail Prices API

    Option 2: Build a Lookup Table

    • Export Advisor recommendations and EA price sheet.
    • Use the Retail Prices API or the Azure RateCard API to create a mapping table:
      • ARM SKU → Meter ID → EA Part Number.
      • Store this mapping in a CSV or database for future joins.

    Option 3: Power BI or PowerShell Integration

    • Pull Advisor data via ARG.
    • Pull pricing data via Retail Prices API.
    • Merge using Meter IDs or Product IDs, not SKU names.

    Hope this helps you get closer to a solution! Let me know if you have any further questions!


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.