AI-102 Azure Cognitive Services Practice Question
Network Topology
You run the above Azure CLI command. What is the expected output?
⚠ Common exam trap
The trap is that candidates may assume `az cognitiveservices account keys list` returns the endpoint along with the keys, but it only returns the primary and secondary keys. The endpoint is obtained via `az cognitiveservices account show`.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The primary and secondary keys
The Azure CLI command `az cognitiveservices account keys list` retrieves only the primary and secondary API keys for the Cognitive Services account. The endpoint is not included in the output; it must be obtained separately using `az cognitiveservices account show`. Therefore, the expected output contains the primary key and secondary key only.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The primary and secondary keys along with the endpoint
Why it's wrong here
The command retrieves keys, but the endpoint is not part of its output; endpoint retrieval requires a separate command. Returning keys with the endpoint is tempting because both are needed to connect a client, and would be correct when a command explicitly requests the endpoint alongside credentials.
- ✓
The primary and secondary keys
Why this is correct
The Azure CLI command regenerates or lists the resource's access keys, so the output contains the primary and secondary keys. These credentials authenticate requests to the Azure AI service, matching the expected key pair returned by the operation.
- ✗
A list of endpoints for the service
Why it's wrong here
The command returns keys and endpoint details, not an endpoint list; endpoints are surfaced by commands such as listing account endpoints. A list of endpoints is tempting because endpoint discovery is a real Azure CLI capability, and would be correct when enumerating service endpoints rather than retrieving a resource's credentials.
- ✗
An error because the command is incorrect
Why it's wrong here
The command is valid syntax and succeeds, so no error is returned. Expecting an error is tempting when the resource name or group is assumed wrong, and would be correct if the resource did not exist or the CLI command name were misspelled.
Go deeper
Related to this question
About these practice questions
This AI-102 question is part of Courseiva's 761-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.