ARM Templates: StorageAccounts/FileServices ERROR "Status Message: XML specified is not syntactically valid."

Mauro Masucci 6 Reputation points
2021-04-01T08:35:28.81+00:00

Getting the following error with my ARM template

17:25:32 - Status Message: XML specified is not syntactically valid.
17:25:32 - RequestId:599711fc-c01a-009b-5b4a-26da63000000
17:25:32 - Time:2021-03-31T16:24:41.9627334Z (Code:InvalidXmlDocument)
17:25:32 -
17:25:32 - CorrelationId: e059d318-89ba-436a-9a21-9a06dc18a09d

Other than parameterising the name for the storage account I havent tweaked them, and I can't find any XML or reference to this issue anywhere.

{
"type": "Microsoft.Storage/storageAccounts/fileServices",
"apiVersion": "2021-01-01",
"name": "[concat(variables('StorAccName'), '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', variables('StorAccName'))]"
],
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"properties": {
"protocolSettings": {
"smb": {}
},
"cors": {
"corsRules": []
}
}
},

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,686 questions
0 comments No comments
{count} vote

4 answers

Sort by: Most helpful
  1. Matt Allford 116 Reputation points
    2021-04-09T04:11:27.237+00:00

    I just came across this as well, and I think it is to do with the apiVersion being used when exporting the template from an already deployed resource.

    I changed my templated to use 2019-06-01, instead of the 2021-01-01 that was being used for Microsoft.Storage/storageAccounts/fileServices, and deployment then worked OK.

    Edit: Actually, that wasn't it. I removed the following empty sections from the template, and the deployment works. When this is put back in, it fails again regardless of the API version.

    "protocolSettings": {
    "smb": {}
    },
    "cors": {
    "corsRules": []
    },

    23 people found this answer helpful.

  2. deherman-MSFT 33,296 Reputation points Microsoft Employee
    2021-04-01T20:24:35.56+00:00

    @Mauro Masucci
    I believe the issue is that you are specifying the type as Microsoft.Storage/storageAccounts/fileServices. It should simply be Microsoft.Storage/storageAccounts. You can refer to this thread for more information and tips.

    Hope this helps! Let us know if you are still facing issues or have further questions.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


  3. aleksejsp 1 Reputation point
    2021-05-24T09:01:15.253+00:00

    Thanks for the post, it helped!

    0 comments No comments

  4. Jesse 1 Reputation point
    2021-11-30T07:21:52.473+00:00

    @Matt Allford Thanks for your hint, this probably saved me 10 hours or so ;)