Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 10, 2025

Problem

The Rate Optimization workbook's Azure Hybrid Benefit (AHB) reports incorrectly included Dev/Test subscriptions, even though Azure Hybrid Benefit doesn't apply to these resources. Dev/Test subscriptions come with Visual Studio licenses that already cover Windows operating system costs, making them ineligible for Azure Hybrid Benefit.

This issue could lead to:

  • Incorrect license tracking and compliance reporting
  • Confusion about which resources actually consume AHB licenses
  • Potential over-counting of AHB usage

Root Cause

Analysis of the AHB workbook queries revealed that 4 out of 48 subscription-related queries were missing the Dev/Test exclusion filter. Specifically, all 4 queries were for Virtual Machine Scale Sets (VMSS):

  • 2 queries in src/workbooks/optimization/AHB/AHB.workbook (VMSSAHBEnabled-RG and VMSSAHBDisabled-RG)
  • 2 queries in src/workbooks/optimization/Compute/AHB.workbook

The remaining 44 queries already had the correct filter in place, using the pattern:

where tostring (properties.subscriptionPolicies.quotaId) !has "MSDNDevTest_2014-09-01"

Solution

Added the Dev/Test subscription exclusion filter to all 4 affected VMSS queries. This aligns them with:

  1. Microsoft licensing requirements: Azure Hybrid Benefit for Windows Server requires Software Assurance or subscription licenses through commercial licensing agreements, which Dev/Test subscriptions don't use.

  2. Existing workbook patterns: 91.7% of queries (44/48) already excluded Dev/Test subscriptions correctly.

  3. FinOps toolkit documentation: The toolkit's own workbook customization guide explicitly states: "It queries the ResourceContainers table and removes the ones that are Dev/Test because Azure Hybrid Benefit doesn't apply to Dev/Test resources."

Changes

  • src/workbooks/optimization/AHB/AHB.workbook: Added Dev/Test filter to 2 VMSS queries
  • src/workbooks/optimization/Compute/AHB.workbook: Added Dev/Test filter to 2 VMSS queries
  • docs-mslearn/toolkit/changelog.md: Documented the fix

Testing

  • ✅ Validated JSON syntax for both modified workbook files
  • ✅ Verified all 48 subscription queries now include the Dev/Test exclusion filter
  • ✅ Code review completed with no issues

Impact

Dev/Test subscriptions are now automatically excluded from all Azure Hybrid Benefit reports. This provides accurate license tracking without requiring users to manually filter or toggle subscription types.

Fixes #1855

Original prompt

This section details on the original issue you should resolve

<issue_title>Rate Optimization workbook, Hybrid Benefit report includes Dev/Test subscriptions by default</issue_title>
<issue_description>Azure Hybrid Benefits should not be shown as being applied to a AHB report. All the Windows licenses are covered by the Visual Studio licenses.

Either change the report to auto exclude the Dev/Test plan subscriptions or put a toggle on the report to easily exclude.

</issue_description>

<agent_instructions>Triage the issue, research using mslearn, provide proposed solutions along with links/citations to authorative sources.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@arthurclares @cassiejones444 Where you are seeing this? Workbook or Power BI report?

Fixes #1819


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Update Hybrid Benefit report to exclude Dev/Test subscriptions Fix: exclude Dev/Test subscriptions from Azure Hybrid Benefit reports Oct 10, 2025
Copilot AI requested a review from MSBrett October 10, 2025 20:40
@MSBrett MSBrett added Type: Bug 🐛 Something isn't working Tool: Workbooks Azure Monitor workbooks Skill: KQL KQL queries and Data Explorer integration Status: 🔬 Code review Issue is currently in code review with open PRs and removed Skill: Documentation Documentation updates Skill: DevOps GitHub setup and automation Needs: Review 👀 PR that is ready to be reviewed Tool: FinOps guide Implementing FinOps guide labels Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skill: KQL KQL queries and Data Explorer integration Status: 🔬 Code review Issue is currently in code review with open PRs Tool: Workbooks Azure Monitor workbooks Type: Bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rate Optimization workbook, Hybrid Benefit report includes Dev/Test subscriptions by default

5 participants