I am very new to Azure CLI and having problems in converting the following command
Set-AzCognitiveServicesAccount -ResourceGroupName rg-xxx -Name cs-xxx -DisableLocalAuth $false
Any help will be greatly appreciated.
Thanks in advance.
BR
CodePudding user response:
To convert the above PowerShell command to Azure CLI, you can use the following Azure CLI command:
az cognitiveservices account update --resource-group rg-xxx --name cs-xxx --disable-local-auth false
Note that the --disable-local-auth option is used to enable local authentication for the Cognitive Services account. If you want to disable local authentication, you can use the --disable-local-auth true option instead.
I hope this helps. Let me know if you have any other questions.
CodePudding user response:
I have reproduced in my environment and received same error as you have as below and I followed Microsoft-document:
az cognitiveservices account update --name YY -g XX --disable-local-auth $false

XX- Name of resource group YY- Name of cognitive service
The above error states that az cognitiveservices account update command does not support argument --disable-local-auth .
This command only supports --name --resource-group --api-properties --custom-domain --encryption --sku --storage --tags arguments.
Alternatively, you can use Rest-Api to enable or disable local auths.
