Azure CLI Create Cognitive Services Account for OpenAI with CMK
HOTSPOT
You have an Azure subscription.
You need to create a new resource that will generate fictional stores in response to user prompts. The solution must ensure that the resource uses a customer-managed key to protect data.
How should you complete the script? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Community Insight
The question requires identifying the specific Azure Cognitive Services resource type for generative text (OpenAI) and the precise CLI parameter ('--api-properties') that accepts JSON payload for Customer Managed Keys.
This scenario tests the Azure CLI commands to provision an Azure OpenAI resource with customer-managed encryption keys. The correct configuration uses 'OpenAI' as the service type and '--api-properties' to define encryption settings.
Learners often confuse the service type (selecting generic 'CognitiveServices' instead of 'OpenAI') or select '--encryption' which is not a valid parameter for this command in the context of passing JSON properties.
Community Discussion (4 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
To generate fictional stores from user prompts, you must use the Azure OpenAI service type, as it handles generative AI workloads. In the Azure CLIaz cognitiveservices account create command, the --api-properties parameter is used to pass complex configurations via JSON. This JSON object allows you to specify "keySource": "Microsoft.KeyVault", which enables Customer-Managed Keys (CMK) for data protection.Why Other Candidate Answers Are Wrong
Generic options like 'CognitiveServices' do not specify the generative AI workload required for text generation. Parameters like '--assign-identity' are for RBAC and managed identities, not encryption. '--encryption' is not a valid standalone flag for setting key sources in this specific command version; the property must be passed within the JSON structure of '--api-properties'.Community Comment Notes
As Alvarogc noted, 'OpenAI' is the only one that generates free text, and '--encryption' does not receive JSON. Srikantha correctly identified that '--api-properties' is the parameter used to specify the encryption key source and Azure Key Vault properties. AIBoss also confirmed the reference to the official CLI documentation for creating accounts without confirmation but with user-managed encryption.Official Reference
Exam Strategy
Memorize the Azure CLI parameters for common AI services. Specifically, know that 'OpenAI' is the service type for generative tasks and that complex JSON configurations like encryption keys are handled via '--api-properties'.
Frequently Asked Questions
Which Azure CLI parameter sets Customer-Managed Keys?
Use '--api-properties' and pass a JSON object containing '"keySource": "Microsoft.KeyVault"'.
What service type is needed for generating text?
You must specify 'OpenAI' as the service type to enable generative text capabilities.
Related Analysis
Practice All AI-103 Questions
Access 88 questions with complete answers and detailed explanations.
View Full AI-103 Practice Test →