Microsoft DevOps Engineer Expert (AZ-400) · Section 4 · 13% of the exam
Implement and manage GitHub authentication, including GitHub Apps, GITHUB_TOKEN, and personal access tokens
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
permissionskey; 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
An Azure DevOps Azure Resource Manager service connection, created with a service principal and a secret, fails every two years when the secret expires. Azure DevOps created the service principal automatically. What is the lasting fix?
- ACreate a new client secret with the longest available lifetime and update the connection
- BReplace the connection with a publish profile
- CConvert the service connection to workload identity federation
- DGrant the Stakeholder access level to the pipeline identity so that it can renew the credential
Show the answer
C. Automatically created connections that use a secret can be converted with the Convert button on the connection page; manually created ones need a manual federated credential. Workload identity federation removes the secret that expires.
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
- Choose between Microsoft Entra service principals and managed identities for Azure resources (system-assigned and user-assigned)
- Implement and manage Azure DevOps service connections and personal access tokens
- Design and implement permissions and roles in GitHub
- Design and implement permissions and security groups in Azure DevOps
- Recommend appropriate access levels, including stakeholder access in Azure DevOps and outside collaborator access in GitHub
- Configure projects and teams in Azure DevOps
- Implement and manage secrets, keys, and certificates by using Azure Key Vault
- Implement and manage secrets and secretless authentication (for example, workload identity federation/OpenID Connect) in GitHub Actions and Azure Pipelines
- Design and implement a strategy for managing sensitive files during deployment, including Azure Pipelines secure files
- Design pipelines to prevent leakage of sensitive information
- Design a strategy for security and compliance scanning, including dependency, code, secret, and licensing scanning
- Configure Microsoft Defender for Cloud DevOps Security