• Hands-On Labs
    • Hands-on Lab Exercises
      • Free Azure Lab Project
      • Azure Skillbuilder Collection
      • Azure Administrator Lab Series
      • Active Directory Skillbuilder
      • Microsoft Entra ID Skillbuilder
    • Hands-on Lab Projects
      • Hands-On Azure Labs: Building Redundant Cloud Solutions​
      • Hands-On Azure Labs: Deploy and Configure Azure Monitor
      • Microsoft Applied Skills Lab: Secure Storage for Azure Files and Azure Blob Storage
      • Microsoft Foundry Hands-On Labs: Build an AI Knowledge Assistant
  • Courses
    • Interactive Learning
      • AZ-900 Interactive Course
    • Microsoft Azure
      • AZ-900 Bootcamp: Microsoft Azure Fundamentals
      • AZ-104 Exam Prep: Microsoft Azure Administrator
    • Microsoft 365
      • MS-900 Exam Prep: Microsoft 365 Fundamentals
      • MS-102 Bootcamp: Microsoft 365 Administrator
  • About
  • Pricing
  • For Instructors
  • Login
  • Hands-On Labs
    • Hands-on Lab Exercises
      • Free Azure Lab Project
      • Azure Skillbuilder Collection
      • Azure Administrator Lab Series
      • Active Directory Skillbuilder
      • Microsoft Entra ID Skillbuilder
    • Hands-on Lab Projects
      • Hands-On Azure Labs: Building Redundant Cloud Solutions​
      • Hands-On Azure Labs: Deploy and Configure Azure Monitor
      • Microsoft Applied Skills Lab: Secure Storage for Azure Files and Azure Blob Storage
      • Microsoft Foundry Hands-On Labs: Build an AI Knowledge Assistant
  • Courses
    • Interactive Learning
      • AZ-900 Interactive Course
    • Microsoft Azure
      • AZ-900 Bootcamp: Microsoft Azure Fundamentals
      • AZ-104 Exam Prep: Microsoft Azure Administrator
    • Microsoft 365
      • MS-900 Exam Prep: Microsoft 365 Fundamentals
      • MS-102 Bootcamp: Microsoft 365 Administrator
  • About
  • Pricing
  • For Instructors
  • Login
  • Hands-On Labs
    • Hands-on Lab Exercises
      • Free Azure Lab Project
      • Azure Skillbuilder Collection
      • Azure Administrator Lab Series
      • Active Directory Skillbuilder
      • Microsoft Entra ID Skillbuilder
    • Hands-on Lab Projects
      • Hands-On Azure Labs: Building Redundant Cloud Solutions​
      • Hands-On Azure Labs: Deploy and Configure Azure Monitor
      • Microsoft Applied Skills Lab: Secure Storage for Azure Files and Azure Blob Storage
      • Microsoft Foundry Hands-On Labs: Build an AI Knowledge Assistant
  • Courses
    • Interactive Learning
      • AZ-900 Interactive Course
    • Microsoft Azure
      • AZ-900 Bootcamp: Microsoft Azure Fundamentals
      • AZ-104 Exam Prep: Microsoft Azure Administrator
    • Microsoft 365
      • MS-900 Exam Prep: Microsoft 365 Fundamentals
      • MS-102 Bootcamp: Microsoft 365 Administrator
  • About
  • Pricing
  • For Instructors
  • Login
  • Hands-On Labs
    • Hands-on Lab Exercises
      • Free Azure Lab Project
      • Azure Skillbuilder Collection
      • Azure Administrator Lab Series
      • Active Directory Skillbuilder
      • Microsoft Entra ID Skillbuilder
    • Hands-on Lab Projects
      • Hands-On Azure Labs: Building Redundant Cloud Solutions​
      • Hands-On Azure Labs: Deploy and Configure Azure Monitor
      • Microsoft Applied Skills Lab: Secure Storage for Azure Files and Azure Blob Storage
      • Microsoft Foundry Hands-On Labs: Build an AI Knowledge Assistant
  • Courses
    • Interactive Learning
      • AZ-900 Interactive Course
    • Microsoft Azure
      • AZ-900 Bootcamp: Microsoft Azure Fundamentals
      • AZ-104 Exam Prep: Microsoft Azure Administrator
    • Microsoft 365
      • MS-900 Exam Prep: Microsoft 365 Fundamentals
      • MS-102 Bootcamp: Microsoft 365 Administrator
  • About
  • Pricing
  • For Instructors
  • Login

Azure Tags — Quick Reference

Fast lookup for tagging strategy, limits, policies, governance & best practices.

Core Overview

  • Key-value metadata pairs for organizing Azure resources.
  • Apply to resources, resource groups, subscriptions (not management groups).
  • Enable cost tracking, automation, billing, and governance.
  • All cost-accruing services support tags; track via Cost Management.
  • Example: Environment=Production, CostCenter=IT-12345.
Not inherited; must explicitly assign or use Azure Policy.

Tag Limits

LimitValue
Max tags per entity50 pairs
Tag name length512 chars (128 storage)
Tag value length256 characters
Special resourcesMax 15 tags (Automation, CDN, DNS)
Use JSON value for complex data in single tag.

Invalid Characters

  • Cannot use: < > % & \ ? /
  • Azure DNS: No spaces, parentheses, or starting with number.
  • Traffic Manager: No spaces, #, :; cannot start with number.
  • Azure Front Door: No # or :.
  • Names case-insensitive; values case-sensitive.

Required Access

RoleCapability
Tag ContributorTag any resource
ContributorFull access
Resource-specific ContributorOne resource type only
Write access to Microsoft.Resources/tags required.

Common Categories

  • Cost: CostCenter, Department, Project, Chargeback.
  • Operational: Environment, Application, Owner, Tier.
  • Governance: Classification, Compliance, DataType.
  • Automation: Shutdown, Backup, Patch, RunsOn.
  • Business: BusinessUnit, Owner, SLA.

Azure Policy Governance

  • Deny: Prevent deployment without required tags.
  • Modify: Auto-add/update tags on resources.
  • Audit: Log compliance violations without enforcement.
  • Remediation applies Modify to non-compliant resources.
  • Scope to management groups for org-wide enforcement.

Policy Scenarios

ScenarioEffect
Require Environment tagDeny
Auto-inherit RG tagsModify
Enforce allowed valuesDeny
Audit untaggedAudit
Prepend cost centerModify

Security Best Practices

  • No sensitive data: Tags in reports, history, templates.
  • No passwords/tokens: Use Key Vault instead.
  • Use RBAC + Policy to restrict modifications.
  • Monitor tag changes via Activity Logs.
  • Validate compliance via Policy compliance dashboard.

Tag Inheritance

  • Resources do NOT inherit tags from RG/subscription by default.
  • Use Policy Modify effect to inherit parent tags.
  • Pattern: "Inherit tag from resource group".
  • Scope policies to management groups organization-wide.
  • Remediation handles existing non-compliant resources.

Cost Management & Billing

  • Download usage CSV; tags in "Tags" column.
  • Use Cost Management for cost analysis by tag.
  • cm-resource-parent tag groups costs by resource ID.
  • Enable chargeback per department/business unit.
  • Track budget allocations by tag value.

CLI Examples

# Add tags to resource az resource tag -n MyVM -g MyRG --tags Env=Prod Owner=alice # Add tags to resource group az group update --name MyRG --set tags.Env=Production # List resources by tag az resource list --tag Env=Production # PowerShell: Get by tag Get-AzResource -Tag @{Environment="Production"} # Add tag to resource Update-AzTag -ResourceId "/subscriptions/.../MyVM" \ -Tag @{Owner="bob"} -Operation Merge # View all tags az tag list --query "[].{Key: key}" -o table