li-raz li-raz - 1 year ago 141
reST (reStructuredText) Question

Azure - trying to create encrypted storage account

the storage account encryption is finally live
and I have tried to create an encrypted storage account using REST call
and i am getting an error
my url is

but I am getting an error which - according to it, Azure thinks I am sending the old request

Error Message: Code: AccountTypeMissing Message: The accountType field is missing from the request.

Answer Source

I have tested on my local. Please double check your code with my reply. Here is the result: enter image description here

The Rest API document:

PUT:{subscription ID}/resourceGroups/jatestgroup/providers/Microsoft.Storage/storageAccounts/akingtt?api-version=2016-01-01


Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhb......
Content-Type: application/json
Content-Length: 443

Request Body

    "location": "East Asia",
    "tags": {

    "properties": {

        "encryption": {
                "services": {
                         "blob": {
                                 "enabled": true
                "keySource": "Microsoft.Storage"    
    "sku": {
        "name": "Standard_RAGRS"
    "kind": "Storage"

Please note:
1) "Kind" is Required in version 2016-01-01 and later.
2) "accessTier" is Required when kind = 'BlobStorage'. Forbidden when kind = 'Storage'.
3) prior to version 2016-01-01, 'sku' was called 'accountType' and was found under the 'properties' envelope.