Question 50
Python code must authenticate without storing long-lived Foundry API keys. Which change should the Azure AI engineer make first?
Explanation
Correct Answer
Use Microsoft Entra ID credentials or managed identity where supported and assign least-privileged roles. This avoids long-lived API keys embedded in application code.
Incorrect Answers
Private code storage reduces accidental exposure but still embeds a reusable long-lived key instead of using a scoped, refreshable identity credential flow.
Prompts are not a safe credential transport; they may expose keys in model context, transcripts or output, rather than token-based application authentication.
Broad management rights and another long-lived secret do not satisfy least-privilege keyless authentication for Foundry inference.