Add tags and filter by them

Azure Portal, Hands On5 minutesFreeSteps checked 17 October 2026By Cloud Hands On

In this task you'll add tags to a resource group.

Tags are labels made of a name and a value, such as owner = cloud-team or environment = test. They help you find things, split the bill between teams and spot test resources that should have been deleted.

Example. Ironbridge Payments tags every resource with costcentre and owner. Each month, finance groups Cost analysis by the costcentre tag to charge each team for what it used.

Before you start

You need: Contributor or Tag Contributor. Time: 5 minutes.

Where to look

  1. Resource groups
  2. rg-portal-practice
  3. Tags

Steps

  1. Open Resource groups and select rg-portal-practice.Create it first with the previous task if you haven't already.
  2. Select Tags in the left menu.
  3. Enter owner as a name and a team name such as cloud-team as its value. On the next row, add purpose = practice if it isn't there yet.The page warns you not to put personal or sensitive information in tags, because tag data is copied around the world. So use a team, not a person's name.
  4. Select Apply.Tags on a group aren't copied to the resources inside it. Each resource has its own tags.
  5. Open All resources, select Add filter, choose a tag such as purpose, then pick the value practice.Only items carrying that tag stay in the list.
  6. Once resources have been running for a while, you can also group Cost analysis by a tag to see what each label costs.

Commands

# Add tags without removing the ones already there
az tag update --operation merge --tags owner=cloud-team purpose=practice \
  --resource-id $(az group show --name rg-portal-practice --query id --output tsv)

# Find everything tagged purpose=practice
az resource list --tag purpose=practice --output table

Watch out for

Cost
Tags are free.
Security
Anyone who can read a resource can read its tags, so never put passwords, keys or personal details in them.
Common mistakes
Tag values are case-sensitive, so Test and test can end up as two different values. Pick one style (all lower case is easiest) and stick to it. Each resource can hold up to 50 tags.

Clean up

  1. rg-portal-practice
  2. Tags

Select the bin icon next to a tag, then Apply. Deleting the resource group also removes its tags.

Words to know

Tag
A name and value label you add to a resource or resource group.

Tick off each step and track your progress in the guide.

Open this task in Azure Portal, Hands On

Keep going