Agile Jedi
Agile Jedi

Reputation: 2942

When mounting an azure file share in a web app I get a state of InvalidCredentials

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

Upvotes: 3

Views: 2218

Answers (3)

R44
R44

Reputation: 185

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

Upvotes: 0

Michael Munsey
Michael Munsey

Reputation: 3870

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.

Upvotes: 1

Nancy Xiong
Nancy Xiong

Reputation: 28224

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

Upvotes: 0

Related Questions