DP-300 Implement a secure environment Practice Question
Your company has an Azure SQL Database that is accessed by multiple applications. You need to implement a security solution that meets the following requirements: - Each application must have its own database user with specific permissions. - All authentication must use Microsoft Entra ID. - You need to be able to rotate credentials for each application without impacting other applications. - The solution must support automatic credential rotation for service principals.
What should you do?
⚠ Common exam trap
The trap is choosing managed identities for applications (they only work for Azure-hosted resources) or a shared service principal (which breaks per-app rotation isolation).
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
✓
Create a Microsoft Entra ID service principal for each application, store the client secret in Azure Key Vault, and create a contained database user mapped to each service principal.
Creating a separate Microsoft Entra ID service principal per application, storing each client secret in Key Vault, and mapping each to a contained database user gives per-application identity, Entra-only authentication, independent credential rotation, and Key Vault's automatic rotation support. Contained users live in the database, so no server-level login is needed and permissions are scoped per app.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use managed identities for each Azure resource and assign permissions to the database.
Why it's wrong here
Managed identities are issued and rotated by the Azure platform, but they authenticate only Azure-hosted resources, so external or on-premises applications cannot obtain one. They suit Azure VMs, App Service or Functions needing credential-free access to the database.
- ✗
Create a single Microsoft Entra ID service principal for all applications and assign different database roles.
Why it's wrong here
A single service principal shared across applications prevents per-application credential rotation, since rotating one secret affects every application, and it cannot grant each application its own database user. Separate service principals per application satisfy that isolation.
- ✗
Create SQL logins and users for each application with strong passwords, and configure password rotation policies.
Why it's wrong here
SQL logins authenticate against the database engine itself, so they cannot satisfy the Microsoft Entra ID requirement, and rotating one login's password still requires manual coordination rather than automatic service-principal rotation. SQL authentication is the right choice only for legacy applications that cannot use token-based Entra authentication, or for contained database users in non-Entra environments.
- ✓
Create a Microsoft Entra ID service principal for each application, store the client secret in Azure Key Vault, and create a contained database user mapped to each service principal.
Why this is correct
Contained database users mapped to Microsoft Entra ID service principals let each application authenticate independently, with no shared server-level login. Storing each client secret in Azure Key Vault enables per-application rotation without affecting others, and Key Vault's rotation policies satisfy the automatic credential rotation requirement.
Go deeper
Related to this question
Learn chapter
Deploying and Configuring SQL Server on Azure Virtual Machines
Key term
Azure SQL Performance Tuning
Azure SQL Performance Tuning is the process of optimizing the speed and efficiency of queries and database operations in Microsoft Azure SQL Database or SQL Managed Instance to reduce latency and improve throughput.
About these practice questions
One of 574 original DP-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 →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Microsoft exam blueprint
This DP-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 DP-300 exam.