user2794745
user2794745

Reputation: 39

Azure CLI - Setting Incoming Client Certificates to Allowed for a Web App

I'm trying to use the Azure CLI to update the Incoming Client Certificate option under Web App > Configuration > General Settings > Incoming Client Certificates to use the value Allow.

Currently I can only set the value to true/false which correlates to Require/Ignore.

az webapp update --set clientCertEnabled=true--name MyWebApp --resource-group MyRsGrp

I haven't been able to find anything in the reference documentation.

https://learn.microsoft.com/en-us/cli/azure/webapp?view=azure-cli-latest#az_webapp_update

Does anyone have a nifty way to configure this setting? Thanks!

enter image description here

Upvotes: 0

Views: 1565

Answers (1)

Joy Wang
Joy Wang

Reputation: 42063

To set it to Allow, there are two properties need to be set, clientCertEnabled and clientCertMode, clientCertMode is not available in command az webapp update, you need to use az resource update.

Just use the command below, it works for me.

az resource update --name <webapp-name> --resource-group <group-name> --namespace Microsoft.Web --resource-type sites --set properties.clientCertEnabled=true properties.clientCertMode=Optional 

enter image description here

enter image description here

Upvotes: 1

Related Questions