Courseiva
Implement a secure environmentmediumMultiple ChoiceObjective-mapped

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

    The connection string includes the client ID and secret, not object ID.

  • The service principal's client ID and client secret, and the connection string with 'Authentication=Active Directory Service Principal'.

    Why this is correct

    This is the standard way to connect using a service principal.

  • The service principal's username and password.

    Why it's wrong here

    Service principals do not have a username/password; they use client ID and secret.

  • The service principal's managed identity endpoint.

    Why it's wrong here

    Managed identity is used when running on Azure, not for a developer's workstation.

Go deeper

Related to this question

About these practice questions

This DP-300 question is part of Courseiva's 906-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 →

How Courseiva writes practice questions · Editorial policy

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.