Courseiva
Genaiops InfrastructurehardMultiple ChoiceObjective-mapped

AI-300 Genaiops Infrastructure Practice Question

You are implementing an agentic workflow using Azure AI Foundry. The agent needs to access a secure external API. How should you store the API key securely within the project?

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

Store the key in an 'Azure Key Vault' and reference it as a 'Connection' in the AI Project.

Azure AI Foundry provides a 'Connections' feature that allows storing credentials as secrets, which can then be referenced by agents.

Answer analysis

Option-by-option breakdown

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

  • Pass the key as an environment variable in the deployment YAML.

    Why it's wrong here

    Environment variables are less secure than Key Vault-backed connections.

  • Hardcode the key in the prompt template.

    Why it's wrong here

    This is a significant security risk and anti-pattern.

  • Save the key in a local '.env' file in the code repository.

    Why it's wrong here

    This exposes the credential in source control.

  • Store the key in an 'Azure Key Vault' and reference it as a 'Connection' in the AI Project.

    Why this is correct

    Using Key Vault with AI project connections is the secure, recommended practice.

About these practice questions

One of 204 original AI-300 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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Microsoft exam blueprint

This AI-300 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-300 exam.