Courseiva
Configure and manage automation of tasksmediumMultiple ChoiceObjective-mapped

DP-300 Configure and manage automation of tasks Practice Question

Your team uses GitHub Actions for CI/CD. You need to automatically deploy schema changes to an Azure SQL Database after a pull request merge. The solution must use a service principal with minimal permissions. Which authentication method should the workflow use?

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

Service principal with a client secret stored in GitHub Secrets.

It uses a service principal with a client secret stored in GitHub Secrets, which meets the requirement of using a service principal with minimal permissions. Using a service principal is the appropriate authentication method for an automated CI/CD deployment with Azure SQL Database. Option B is incorrect because a user-assigned managed identity is not a service principal; it is a different type of identity that does not satisfy the requirement for a service principal. Option C is incorrect because storing connection strings in environment variables is insecure and does not use a service principal. Option D is incorrect because SQL authentication does not involve a service principal and is less secure than Azure AD-based methods.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Service principal with a client secret stored in GitHub Secrets.

    Why this is correct

    Correct. A service principal with a client secret stored in GitHub Secrets provides a secure, automated way to authenticate to Azure SQL Database for deployment, and meets the requirement of using a service principal with minimal permissions.

  • Azure CLI action using a user-assigned managed identity for the GitHub runner.

    Why it's wrong here

    Incorrect. A user-assigned managed identity is not a service principal. While it provides passwordless authentication, it does not meet the explicit requirement to use a service principal.

  • Environment variables containing the connection string.

    Why it's wrong here

    Incorrect. Environment variables containing the connection string are not secure and do not involve a service principal. They expose credentials and should be avoided.

  • SQL authentication using a user name and password stored in GitHub Secrets.

    Why it's wrong here

    Incorrect. SQL authentication with a username and password is not a service principal and is less secure. It does not leverage Azure AD integration, making it unsuitable for automated deployments with minimal permissions.

Go deeper

Related to this question

About these practice questions

One of 906 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 →

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.