3

I have a File Share setup in a Storage Account. When I try to mount it in my Web App I get the following response:

  "nexport-shared": {
    "accessKey": "hidden==",
    "accountName": "hidden",
    "mountPath": "\\\\nexportshared",
    "shareName": "nexportcampusbetashare",
    "state": "InvalidCredentials",
    "type": "AzureFiles"
  }

I am using the az CLI command below :

az webapp config storage-account add --resource-group "GROUPNAME" --name "WEBAPPNAME" --custom-id nexport-shared --storage-typeAzureFiles --share-name nexportcampusbetashare --account-name STORAGEACCOUNT --access-key "hidden==" --mount-path "\\nexportshared" --verbose --debug

When I run 'az webapp config list' it shows up in the list but still with InvalidCredentials

Agile Jedi
  • 2,922
  • 2
  • 18
  • 17
  • 1
    Does the issue still exist? If you have found a solution, please share it, thanks. – Nancy Dec 23 '19 at 07:54
  • I'm having a similar issue; linking my post here in case that helps others in future: https://serverfault.com/questions/1086197/mounting-azure-files-in-azure-app-service – JohnLBevan Dec 16 '21 at 12:35
  • For your issue, your mount path is formatted like a UNC path; but normally for Linux containers it would look something like `"mountPath": "/nexportshared"`; or for Windows: `"mountPath": "c:\\nexportshared"`. Hopefully that's some help, if this is still an issue... – JohnLBevan Dec 16 '21 at 12:37

3 Answers3

0

A possible reason is that you have input an invalid key or storage account to mount the Azure files. Correcting these parameters fixes this issue for me.

enter image description here

Fixed as below

enter image description here

Nancy
  • 26,865
  • 3
  • 18
  • 34
0

You may need to turn off or modify the firewall on the storage account for the Azure-Cli and the App Service to be able to see it.

Michael Munsey
  • 3,740
  • 1
  • 25
  • 15
0

I'm getting same response and file share is working as expected.
Also I just found an issue created about this, seems to be an error in the response message from the API:
https://github.com/Azure/azure-cli/issues/21571

R44
  • 153
  • 1
  • 9