DP-300 Implement a secure environment Practice Question
Your company is using Azure SQL Database with Microsoft Entra ID authentication. A developer needs to connect to the database using a service principal. What should you provide to the developer?
⚠ Common exam trap
It's easy for candidates to confuse the service principal's object ID (directory object identifier) with the client ID (application identifier), or mistakenly think a service principal uses a username/password like a regular user, when in fact it relies on OAuth 2.0 client credentials with a client ID and secret.
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
✓
The service principal's client ID and client secret, and the connection string with 'Authentication=Active Directory Service Principal'.
To connect to Azure SQL Database using a service principal with Microsoft Entra ID authentication, the developer needs the service principal's client ID and client secret (or certificate) for authentication, and the connection string must include 'Authentication=Active Directory Service Principal' to specify the authentication method. This combination allows the application to obtain an access token from Microsoft Entra ID via the OAuth 2.0 client credentials grant flow, which is then used to authenticate to the database.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The connection string with 'Authentication=Active Directory Service Principal' and the service principal's object ID.
Why it's wrong here
'Authentication=Active Directory Service Principal' expects the application (client) ID and client secret, not the object ID, so the connection fails. The object ID identifies the service principal within the tenant directory, not the application credential. This authentication mode is correct when supplying the client ID and secret.
- ✓
The service principal's client ID and client secret, and the connection string with 'Authentication=Active Directory Service Principal'.
Why this is correct
Service principal authentication requires the client ID and client secret as credentials, paired with the Active Directory Service Principal authentication keyword in the connection string, enabling the developer to authenticate non-interactively against Microsoft Entra ID.
- ✗
The service principal's username and password.
Why it's wrong here
Microsoft Entra ID authentication does not accept a service principal username and password; credentials are the application (client) ID plus client secret or certificate. Supplying a username and password fails because Entra ID issues no such password for service principals. Username/password suits Entra ID user accounts, not service principals.
- ✗
The service principal's managed identity endpoint.
Why it's wrong here
A managed identity endpoint belongs to Azure resources using managed identities, not to a service principal authenticating externally. Service principals authenticate with a client secret or certificate via the connection string. Managed identity endpoints are correct when the connecting resource itself has a system- or user-assigned identity.
Go deeper
Related to this question
Learn chapter
Managing Identity and Access for Azure SQL
Key term
Azure SQL Authentication
Azure SQL Authentication is the process of verifying a user's identity to access an Azure SQL database using either a username and password (SQL Authentication) or a Microsoft Entra ID (formerly Azure AD) identity.
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
This DP-300 question is part of Courseiva's 574-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.