azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az storage share create misses --auth-mode login option

Open Josefczak opened this issue 5 years ago • 3 comments

When trying to create a storage share without credentials, it works and shows big options. But this option is not implemented.

"There are no credentials provided in your command and environment, we will query for the account key inside your storage account. Please provide --connection-string, --account-key or --sas-token as credentials, or use --auth-mode login if you have required RBAC roles in your command. For more information about RBAC roles in storage, visit https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli. Setting the corresponding environment variables can avoid inputting credentials in your command. Please use --help to get more information."

[Enter feedback here]


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Josefczak avatar Feb 08 '21 16:02 Josefczak

Storage

yonzhan avatar Feb 08 '21 23:02 yonzhan

Hi @Josefczak, it is by design that share service doesn't support --auth-mode login, which requires Azure AD credentials. So in this scenario, we will recommend you to use --account-key, --connection-string or --sas-token for authentication, as you can see in https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-requests-to-azure-storage.

Juliehzl avatar Mar 01 '21 02:03 Juliehzl

But we will refine the warning with right options.

Juliehzl avatar Mar 01 '21 03:03 Juliehzl