Microsoft

AI-103 practice question 14

Developing AI Apps and Agents on Azure · free question 14 of 20

Question

You have a Microsoft Foundry project named Project1 that contains an agent. The agent uses an OpenAPI 3.0 specification to call an external weather service. The weather service requires a key to be passed in an HTTP header. The key value is stored as a connection in Project1. You need to ensure that the key value from the connection is included automatically whenever the OpenAPI tool is invoked. What should you configure in the OpenAPI specification?
  • A. a header parameter defined for each operation
  • B. an Azure Key Vault connection
  • C. an API key security scheme Correct
  • D. a Bearer token security scheme

Explanation

The OpenAPI tool passes a stored key when the specification has a securitySchemes entry of type apiKey, with the header name matching the key name in the project connection, plus a security section that references it. Without this configuration, the key isn't included in requests. Per-operation header parameters are the wrong approach, because the documentation says to remove any parameter that needs the key since it is passed through the connection. A Key Vault connection is not an OpenAPI specification setting, and a Bearer scheme does not describe a key sent in a named header.

Need the theory? Learn it free in the AI-103 course on Godlike Academy

Practice the whole free set

Answer all 20 free AI-103 questions with instant feedback, or unlock all 65 questions with Learn and Exam modes.