According the this doc the Tag which started the build can be found in BUILD_SOURCEBRANCH.
If this build was queued by the creation of a tag then this is the name of that tag. For Azure Pipelines, the BUILD_SOURCEBRANCH will be set to the full Git reference name, eg refs/tags/tag_name.