Courseiva

AI-102 Implement computer vision solutions Practice Question

Network Topology
name MyVisionServiceresource-group rg-visionRefer to the exhibit.Output:"key1": "abc123","key2": "def456"

You have an Azure AI Vision resource named MyVisionService. You run the above Azure CLI command and get the keys. Your application uses key1 for authentication. You need to rotate the keys without downtime. What should you do?

⚠ Common exam trap

Watch out — candidates often think regenerating the key currently in use is acceptable if done quickly, but Azure explicitly requires using the secondary key to avoid any period of invalid credentials.

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

✓

Update the application to use key2, then regenerate key1

It enables key rotation without downtime. By first updating the application to use key2 (the secondary key), you ensure that authentication continues to work while key1 is being regenerated. After key1 is regenerated, you can optionally update the application back to key1 at a later time. This pattern is standard for Azure Cognitive Services to maintain continuous access.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Delete and recreate the Cognitive Services resource

    Why it's wrong here

    Deleting and recreating the resource destroys the endpoint, keys and configuration, guaranteeing an outage. Recreation is used when changing region, tier or resource type, not for credential rotation, which the key regeneration operations handle in place.

  • ✗

    Regenerate key1 immediately and update the application to use the new key1

    Why it's wrong here

    Regenerating key1 immediately invalidates the credential the running application is still presenting, so requests fail until the update propagates. Regeneration is the right action once traffic has moved to key2; the rotation sequence requires switching the application to the untouched key first, then regenerating the idle one.

  • ✗

    Regenerate both keys at the same time

    Why it's wrong here

    Regenerating both keys simultaneously invalidates every credential at once, causing downtime until the application is updated. Rotating keys one at a time is the standard practise; simultaneous regeneration suits scenarios where no live traffic depends on either key.

  • ✓

    Update the application to use key2, then regenerate key1

    Why this is correct

    Both keys are valid simultaneously, so switching the application to key2 first keeps authentication working while key1 is regenerated. This ordering avoids downtime, whereas regenerating key1 while still in use would immediately break authentication for the running application.

About these practice questions

One of 761 original AI-102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.