Skip to content

Commit 7e4b643

Browse files
committed
update CLI command
1 parent bc7c840 commit 7e4b643

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

articles/azure-app-configuration/howto-disable-access-key-authentication.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ To allow/disallow access key authentication for an Azure App Configuration resou
3535

3636
# [Azure CLI](#tab/azure-cli)
3737

38-
The capability to enable access key authentication using the Azure CLI is in development.
38+
To enable access keys for Azure App configuration resource, use the following command. The `--disable-local-auth` option is set to "false" for enable local auth.
39+
40+
```azurecli-interactive
41+
az appconfig update \
42+
--name <app-configuration-name> \
43+
--resource-group <resource-group> \
44+
--disable-local-auth false
45+
```
3946

4047
---
4148

@@ -58,21 +65,15 @@ To check if access key authentication is enabled for an Azure App Configuration
5865

5966
# [Azure CLI](#tab/azure-cli)
6067

61-
To check if access key authentication is enabled for an Azure App Configuration resource in the Azure portal, use the following command. The command will list the access keys for an Azure App Configuration resource.
68+
To check if access key authentication is enabled for an Azure App Configuration resource, use the following command. The command will list the access keys for an Azure App Configuration resource.
69+
If access key authentication is enabled, then read access keys and read-write access keys will be returned.
6270

6371
```azurecli-interactive
6472
az appconfig credential list \
6573
--name <app-configuration-name> \
6674
--resource-group <resource-group>
6775
```
6876

69-
If access key authentication is enabled, then read access keys and read-write access keys will be returned.
70-
71-
```azurecli-interactive
72-
az appconfig credential list -g <resource-group> -n <app-configuration-name>
73-
[]
74-
```
75-
7677
---
7778

7879
## Disable access key authentication
@@ -94,7 +95,14 @@ To disallow access key authentication for an Azure App Configuration resource in
9495

9596
# [Azure CLI](#tab/azure-cli)
9697

97-
The capability to disable access key authentication using the Azure CLI is in development.
98+
To disable access keys for Azure App configuration resource, use the following command. The `--disable-local-auth` option is set to "true" for disable local auth.
99+
100+
```azurecli-interactive
101+
az appconfig update \
102+
--name <app-configuration-name> \
103+
--resource-group <resource-group> \
104+
--disable-local-auth true
105+
```
98106

99107
---
100108

@@ -117,21 +125,14 @@ To verify access key authentication is disabled for an Azure App Configuration r
117125

118126
# [Azure CLI](#tab/azure-cli)
119127

120-
To verify access key authentication is disabled for an Azure App Configuration resource in the Azure portal, use the following command. The command will list the access keys for an Azure App Configuration resource and if access key authentication is disabled the list will be empty.
128+
To verify access key authentication is disabled for an Azure App Configuration resource, use the following command. The command will list the access keys for an Azure App Configuration resource and if access key authentication is disabled the list will be empty.
121129

122130
```azurecli-interactive
123131
az appconfig credential list \
124132
--name <app-configuration-name> \
125133
--resource-group <resource-group>
126134
```
127135

128-
If access key authentication is disabled, then an empty list will be returned.
129-
130-
```
131-
C:\Users\User>az appconfig credential list -g <resource-group> -n <app-configuration-name>
132-
[]
133-
```
134-
135136
---
136137

137138
## Permissions for allowing or disallowing access key authentication

0 commit comments

Comments
 (0)