Question 180
An Azure-hosted application connects to Azure SQL using a shared password embedded in deployment scripts. A function app can obtain a token but receives database permission denied when it queries an approved stored procedure. Which response best addresses these needs?
Explanation
Correct Answer
First, managed identity avoids storing a reusable service password while retaining identity-based access control. Second, successful token authentication does not by itself grant database object authorization.
Incorrect Answers
Grant the managed identity the required database principal and narrowly scoped execution rights after verifying authentication; do not use an appropriate managed identity and Microsoft Entra authentication with scoped database permissions: use an appropriate managed identity and Microsoft Entra authentication with scoped database permissions.
Replace the human identity with an approved workload identity and assign minimum operational roles; grant the managed identity the required database principal and narrowly scoped execution rights after verifying authentication: managed identity avoids storing a reusable service password while retaining identity-based access control.
Use an appropriate managed identity and Microsoft Entra authentication with scoped database permissions; Adopt a supported passwordless or centrally rotated secret design and test renewal behavior before expiration: successful token authentication does not by itself grant database object authorization.



Developing AI-Enabled Database Solutions (DP-800) Practice Tests