Cannot change blob tier to archive

Ganczarczyk, Marek 20 Reputation points
2025-02-19T16:03:43.0933333+00:00

Hi,

I cannot change archive tier to archive. this option is grayed out as at screens hot. while using PS is fails at changing to Archive. There is no issue with change in between hot,cool,cold:

The log without exact answer:
PS C:\Users\zmganczarz> $blob.BlobClient.SetAccessTier("Archive", $null)

Exception calling "SetAccessTier" with "2" argument(s): "The value for one of the HTTP headers is not in the correct

format.

RequestId:f109eb97-701e-0005-79e6-8278d5000000

Time:2025-02-19T15:51:20.6200462Z

Status: 400 (The value for one of the HTTP headers is not in the correct format.)

ErrorCode: InvalidHeaderValue

Additional Information:

HeaderName: x-ms-access-tier

HeaderValue: Archive

Content:

<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP

headers is not in the correct format.

RequestId:f109eb97-701e-0005-79e6-8278d5000000

Time:2025-02-19T15:51:20.6200462Z</Message><HeaderName>x-ms-access-tier</HeaderName><HeaderValue>Archive</HeaderValue><

/Error>

Headers:

x-ms-request-id: f109eb97-701e-0005-79e6-8278d5000000

x-ms-client-request-id: 4e6cb22c-f07f-4818-b34b-99b989b0de3c

x-ms-version: 2023-08-03

x-ms-error-code: InvalidHeaderValue

Date: Wed, 19 Feb 2025 15:51:19 GMT

Server: Windows-Azure-Blob/1.0,Microsoft-HTTPAPI/2.0

Content-Length: 329

Content-Type: application/xml

"

At line:1 char:1

  • $blob.BlobClient.SetAccessTier("Archive", $null)
  • 
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    
        + FullyQualifiedErrorId : RequestFailedException
    
    

PS C:\Users\zmganczarz> $blob.BlobClient.SetAccessTier("Cold", $null)

Status : 200

ReasonPhrase : OK

ContentStream : System.IO.MemoryStream

ClientRequestId : f181f058-29eb-4124-bc6c-433c0246d3f7

Headers : {x-ms-request-id:f109fb51-701e-0005-24e6-8278d5000000,

              x-ms-client-request-id:f181f058-29eb-4124-bc6c-433c0246d3f7, x-ms-version:2023-08-03, Date:Wed, 19

              Feb 2025 15:51:58 GMT...}

Content :

IsError : False

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,101 questions
{count} votes

Accepted answer
  1. Vinod Kumar Reddy Chilupuri 2,785 Reputation points Microsoft Vendor
    2025-02-19T17:03:49.3166667+00:00

    Hi Ganczarczyk, Marek,
    It looks like you're encountering an issue when trying to change the access tier of a blob to "Archive" in Azure Blob Storage using PowerShell. The error message indicates that the request is failing due to an invalid header value for the x-ms-access-tier header.

     

    • Blob State: Verify that the blob you are trying to change to the Archive tier is not currently in a state that prevents it from being archived. For example, if the blob is currently being modified or if it is a snapshot, you may not be able to change its tier.
    • Blob Type: The Archive tier can only be applied to block blobs. If you are trying to change the tier of a page blob or append blob, it will not work.
    • Permissions: check whether you have the necessary permissions to change the access tier of the blob. You need to have at least the "Storage Blob Data Contributor" role assigned.
    • Correct Syntax: check that you are using the correct syntax and that the blob reference is valid. The command should look like this:
       $blob.BlobClient.SetAccessTier("Archive", $null)
    
    • Storage Account Configuration: Make sure that your storage account is configured to support the archive tier. Only storage accounts configured for LRS, GRS, or RA-GRS support moving blobs to the archive tier.
    • Version Compatibility: Verify that the version of the Azure SDK you are using is supports with the operations you are trying to perform. The error may arise from using an outdated version.  

    try to use of Azure CLI or the Azure portal as alternative option for users with additional options to achieve their goal. This can be particularly helpful if the issue is specific to PowerShell.

    Access tiers for blob data - Azure Storage | Microsoft Learn

    Archive a blob - Azure Storage | Microsoft Learn

     

    Hope the above suggestion helps! Please let us know do you have any further queries.

    Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ganczarczyk, Marek 20 Reputation points
    2025-02-20T08:39:45.64+00:00

    2025-02-19 17_00_02-Change tier - Microsoft Azure - Profile 1 - Microsoft​ Edge

    under web interface it is grayed out. I don't know why I can change from cool-hot-cold but not to archive

    The question is: Is archive storage available in region Poland Central? How to check it?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.