Skip to content

Commit e3dc5cb

Browse files
Merge pull request #272009 from pauljewellmsft/verify-shared-key
Provide alternate command to check shared key status
2 parents b87f229 + 5d00931 commit e3dc5cb

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

articles/storage/common/shared-key-authorization-prevent.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,22 @@ The **AllowSharedKeyAccess** property is supported for storage accounts that use
298298

299299
## Verify that Shared Key access is not allowed
300300

301-
To verify that Shared Key authorization is no longer permitted, you can attempt to call a data operation with the account access key. The following example attempts to create a container using the access key. This call will fail when Shared Key authorization is disallowed for the storage account. Remember to replace the placeholder values in brackets with your own values:
301+
To verify that Shared Key authorization is no longer permitted, you can query the Azure Storage Account settings with the following command. Replace the placeholder values in brackets with your own values.
302+
303+
```azurecli-interactive
304+
az storage account show \
305+
--name <storage-account-name> \
306+
--resource-group <resource-group-name> \
307+
--query "allow-shared-key-access"
308+
```
309+
310+
The command returns **false** if Shared Key authorization is disallowed for the storage account.
311+
312+
You can further verify by attempting to call a data operation with the account access key. The following example attempts to create a container using the access key. This call will fail when Shared Key authorization is disallowed for the storage account. Replace the placeholder values in brackets with your own values:
302313

303314
```azurecli-interactive
304315
az storage container create \
305-
--account-name <storage-account> \
316+
--account-name <storage-account-name> \
306317
--name sample-container \
307318
--account-key <key> \
308319
--auth-mode key

0 commit comments

Comments
 (0)