How Do You Identify a Created Azure AI Services Account in a Pipeline?

AI-103 By islever Editorial Last updated

Short answer

B Run az cognitiveservices account show to return the created Azure AI services account's identity and properties.

Question

You have an Azure DevOps pipeline named Pipeline1 that is used to deploy an app. Pipeline1 includes a step that will create an Azure AI services account.
You need to add a step to Pipeline1 that will identify the created Azure AI services account. The solution must minimize development effort.
Which Azure Command-Line Interface (CLI) command should you run?
  1. az cognitiveservices account network-rule
  2. az cognitiveservices account show Correct Answer
  3. az account list
  4. az resource link

Key Takeaways

The question tests whether you can pick the CLI verb that reads a single Azure AI services account's identity — the trap is choosing a broad listing command like az account list that enumerates subscriptions instead of the resource.

Identifying the Azure AI services account that Pipeline1 just provisioned means querying that specific resource's properties, not listing subscriptions or editing network rules. The page confirms that az cognitiveservices account show is the minimal-effort CLI step for that job.

Common mistake: Learners often pick az account list because the word 'identify' suggests listing, but that command returns Azure subscriptions for the signed-in user, not the Azure AI services account created by the pipeline step.

Expert Analysis

Why the Answer Is Correct

az cognitiveservices account show is the read operation for a single Azure AI services (Cognitive Services) account: given the account name and resource group that the earlier pipeline step created, it returns the resource's id, endpoint, kind, SKU, and provisioning state. That output is exactly what a subsequent pipeline step needs to "identify" the account and feed its properties into later tasks, such as retrieving the endpoint for a Foundry project connection. It is also the smallest possible addition to the YAML — one task line plus name/resource-group arguments — which satisfies the "minimize development effort" constraint. As Srikantha noted, "This command retrieves the properties and details of a specific Azure Cognitive Services" resource, so no extra scripting or parsing of a full resource dump is required.

Why the Other Options Are Wrong

az cognitiveservices account network-rule is a write operation that adds, lists, or removes virtual network and IP firewall rules for the account; it manages access control and never returns the account's identity. az account list enumerates the Azure subscriptions available to the signed-in identity, which says nothing about which AI services account the pipeline created. az resource link relates to resource links between a resource and a scope (historically used with ARM linked resources) and does not surface an Azure AI services account's properties — it is also not part of the normal AI services workflow. Only the show verb targets the created resource itself.

Community Comment Notes

Community feedback on this item converges on B, with the reasoning that the command "retrieves the properties and details of a specific Azure Cognitive Services / Azure AI services account (by name and resource group)." The same comment explicitly rules out the network-rule option as managing network access rather than retrieving identity or details, and dismisses the subscription-listing option. That matches the vendor's CLI surface: read verbs (show) versus configuration verbs (network-rule) versus subscription-scoped commands (az account list). Treating the vote as corroboration rather than proof, the wording of the question — "identify the created Azure AI services account" — still points unambiguously to the show verb.

Official Reference

https://learn.microsoft.com/en-us/cli/azure/cognitiveservices/account?view=azure-cli-latest

This link opens the official vendor documentation in a new tab.

Exam Strategy

Map the verb in the question to the CLI verb family: 'identify/show/retrieve details' means a show command scoped to the resource, while 'list' commands return collections such as subscriptions. When the stem says "minimize development effort", prefer the single-purpose read command over anything requiring extra parsing or configuration.

Frequently Asked Questions

Why is az cognitiveservices account network-rule wrong for identifying the account?

That command creates, lists, or deletes firewall and virtual network rules for the account. It changes or reports access settings, not the account's identity, endpoint, or SKU.

Can az account list be used to find the new Azure AI services account?

No. az account list returns the Azure subscriptions you can access, so it never reveals which Azure AI services resource the pipeline step created.

More AI-103 FAQ →

Discussion 1 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 1

  1. Srikantha 👍 1 Answered B
    B. az cognitiveservices account show This command retrieves the properties and details of a specific Azure Cognitive Services / Azure AI services account (by name and resource group). After the pipeline creates the account, you can call it to identify and confirm the resource with minimal extra code. A manages network access rules for the account and does not retrieve its identity/details. C (az account list) lists Azure subscriptions, not the AI services resource itself. D works with resource links and is unrelated to identifying a Cognitive Services account.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All AI-103 Questions

Access 88 questions with complete answers and detailed explanations.

View Full AI-103 Practice Test →

← Back to AI-103 Study Guide