Skip to content

New/Update-AzTag on Flex Consumption Service Plan fails #28741

@rsegers

Description

@rsegers

Description

Creating, updating and deleting tags fail on Azure Service Plans if it has the sku flex consumption.

Issue script & Debug output

Update-AzTag -ResourceId '<resourceId>' -Tag @{'example'='example'} -Operation Merge


DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PATCH

Absolute Uri:
https://management.azure.com/{resourceId}/providers/Microsoft.Resources/tags/default?api-version=2024-11-01

Headers:
Accept-Language               : en-US
x-ms-client-request-id        : 59b8bedc-32b3-428a-be70-a5e94168f80f

Body:
{
  "operation": "Merge",
  "properties": {
    "tags": {
      "example": "example"
    }
  }
}


DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-failure-cause            :
x-ms-request-id               : 85bfce1a-9503-44e9-936d-4a8d1c7233fb
x-ms-correlation-request-id   : 85bfce1a-9503-44e9-936d-4a8d1c7233fb
x-ms-routing-request-id       : NORTHEUROPE:20251024T121043Z:85bfce1a-9503-44e9-936d-4a8d1c7233fb
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
X-Cache                       : CONFIG_NOCACHE
X-MSEdge-Ref                  : Ref A: E751AFE583BC4173A73A02FCB4FD4A7C Ref B: DUB241062310029 Ref C: 2025-10-24T12:10:42Z
Date                          : Fri, 24 Oct 2025 12:10:42 GMT

Body:
{
  "error": {
    "code": "ProviderError",
    "message": "{\"Code\":\"BadRequest\",\"Message\":\"Cannot update ServerFarm SKU from 'FlexConsumption' to ''. Please create a new ServerFarm with the desired SKU.\",\"Target\":null,\"Details\":[{\"Message\":\"Cannot update ServerFarm SKU from 'FlexConsumption' to ''. Please create a new ServerFarm with the desired SKU.\"},{\"Code\":\"BadRequest\"},{\"ErrorEntity\":{\"ExtendedCode\":\"53216\",\"MessageTemplate\":\"Cannot update ServerFarm SKU from '{0}' to '{1}'. Please create a new ServerFarm with the desired SKU.\",\"Parameters\":[\"FlexConsumption\",\"\"],\"Code\":\"BadRequest\",\"Message\":\"Cannot update ServerFarm SKU from 'FlexConsumption' to ''. Please create a new ServerFarm with the desired SKU.\"}}],\"Innererror\":null}"
  }
}

Environment data

Name                           Value
----                           -----
PSVersion                      7.5.3
PSEdition                      Core
GitCommitId                    7.5.3
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

PS C:\> Get-Module Az.*

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     5.3.0                 Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     8.1.1                 Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}

Error output

PS C:\> Resolve-AzError

Resolve-AzError: Input string was not in a correct format. Failure to parse near offset 16. Expected an ASCII digit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Azure PS TeamTrackingWe will track status and follow internallybugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reported

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions