CertLumen

Microsoft DevOps Engineer Expert (AZ-400) · Section 4 · 13% of the exam

Choose between Microsoft Entra service principals and managed identities for Azure resources (system-assigned and user-assigned)

One of the objectives of the Exam AZ-400: Designing and Implementing Microsoft DevOps Solutions exam, in the section “Develop a security and compliance plan”. Here is what it covers, the points to remember and a question to try.

What it covers

Pipelines need identities to reach Azure, GitHub and Azure DevOps. This lesson compares Microsoft Entra service principals with system-assigned and user-assigned managed identities, then ranks the credentials GitHub offers (GITHUB_TOKEN, GitHub Apps, personal access tokens) and covers Azure DevOps service connections and personal access tokens.

Points to remember

  • Microsoft Entra ID is the new name of Azure Active Directory (Azure AD); an app registration is global, its service principal is the local instance.
  • A managed identity has no credentials to manage and works only for code running on Azure resources; system-assigned dies with the resource, user-assigned is shared and persistent.
  • Hosted runners and Microsoft-hosted agents use workload identity federation (OIDC) with a federated credential; an app or user-assigned managed identity allows up to 20 federated credentials.
  • GITHUB_TOKEN is per job, limited to its repository and shaped by the permissions key; restricted default is read-only contents and packages.
  • GitHub Apps give short-lived (1 hour) installation tokens and are the preferred non-personal credential beyond GITHUB_TOKEN; fine-grained PATs beat classic PATs.

Try a question

A platform team needs automation that opens pull requests in 40 repositories of a GitHub organization. The pull requests must start normal CI workflow runs. The credential must not depend on an employee account and should expire quickly. What should the team use?

  1. AA GitHub App installed on the 40 repositories, using installation tokens
  2. BThe GITHUB_TOKEN of the workflow that creates the pull requests
  3. CA classic personal access token with the repo scope owned by the team lead and stored as an organization secret
  4. DA deploy key added to each repository and used with an SSH agent in the automation
Show the answer

A. GitHub Apps give short-lived, non-personal tokens with chosen permissions across the repositories where they are installed. GITHUB_TOKEN is repository-scoped and events it causes generally do not start new runs.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson Workload identities and credentials: Entra, GitHub and Azure DevOps teaches this objective (about 50 minutes), and 10 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 86 objectives · Next objective →