Free AZ-400 Exam Braindumps
Designing and Implementing Microsoft DevOps Solutions Questions 30–34 (page: 43)

Updated On: 16-Nov-2026

You manage source control by using GitHub.
You have a file named Data.txt that contains sensitive data. A user pushes Data.txt to a repository.
You need to purge the file from the repository.
Which two commands can you use? Each correct answer presents a complete solution.
Note: Each correct solution is worth one point.

  1. git checkout git clean -d data.txt --force
  2. bfg --delete-files data.txt git push --force
  3. git revert -edit data.txt git push -force
  4. git filter-repo --invert-paths --path data.txt git push origin --force --all
  5. git rm data.txt git push --force
  6. git checkout git reset -hard -pathspec data.txt

Answer(s): D,E

Explanation:

E:
The Problem
How do I delete a file from a Git repository?
The Solution
We can do this using git rm:
git rm unwanted-file.txt
This command will delete the file and stage its deletion to be included in the next commit. If we want to remove a directory, we must include the -r (recursive) flag, as with the standard rm command.
D:
If the file we want to remove contains sensitive content, we will need either to create a new Git repository with a fresh history or to rewrite the history of our current repository using git filter-branch:
git filter-repo -f --index-filter 'git rm --cached --ignore-unmatch unwanted-file.tx
Note that rewriting the commit history in this way is dangerous and will permanently alter your repository. Additionally, git filter-branch is a slow operation, especially for large repositories with many commits. Double-check that the name of the file to be removed is correct before running this command.
After our commit history has been rewritten, we will need to force push the changes to remote repositories using a command such as the following:
git push --force -u origin main


Reference:

https://sentry.io/answers/delete-a-file-from-a-git-repository/



SIMULATION
For Project-12345678, you need to create a service connection that can be used to deploy resources to the RG1 resource group.
The service connection must use the Managed_id1 identity and workload identity federation.
Note: For the Identity type, you need to use the App registration or managed identity (manual) option.

  1. See Explanation section for answer.

Answer(s): A

Explanation:

See explanation below.


To create a scoped Azure DevOps service connection using an existing Managed Identity and Workload Identity Federation, follow these steps:
Action 1: Configure the Service Connection in Azure DevOps
Step 1: Navigate to your Project Settings in Azure DevOps. [Select Project-12345678]
Step 2: Select Service connections under the Pipelines section.
Step 3: Click New service connection and select Azure Resource Manager.
Step 4: Choose Workload Identity federation (manual) as the authentication method.
Step 5: Enter the following details:
Connection name: A unique name for your pipeline to reference.
Scope level: Select Subscription.
Subscription ID/Name: Enter your specific subscription details.
Resource Group: Enter the name of your specific resource group here to restrict the connection's visibility. [Enter RG1]
Issuer and Subject identifier: Azure DevOps will generate these values after you save or during the setup. Copy these values; you will need them for the next step.
Action 2: Establish the Federated Trust in Azure
Step 6: Go to the Managed Identity resource in the Azure Portal.
'Step 7: Select Federated credentials under the Settings menu.
Step 8: Click Add credential.
Step 9: Select Other scenario for the federation type.
Step 10: Paste the Issuer and Subject identifier provided by Azure DevOps.
Step 11: Give the credential a name and click Add.


Reference:

https://microsoftlearning.github.io/implement-security-through-pipeline-using-devops/Instructions/Labs/APL200 1_M00_Validate_Lab_Environment.html



SIMULATION
You need to create a new team dashboard named Dashboard1 for the default project team of Project1.
The dashboard must display the members of the team.

  1. See Explanation section for answer.

Answer(s): A

Explanation:

See explanation below.


Add dashboards in Azure DevOps
Add a dashboard
Add a new dashboard as needed to support your team's needs. You can also edit and rename any existing dashboards associated with your team.
Step 1: From the Dashboards directory, select New Dashboard. Or, when viewing a dashboard, open the selector and select the New Dashboard option.

Step 2: Enter the name of the dashboard and other information you want to capture. [Enter Dashboard1]
Step 2a: Select Team dashboard.
Step 2b: Select: Automatically refresh the dashboard every 5 minutes.

Step 3: Select Create.


Reference:

https://learn.microsoft.com/en-us/azure/devops/report/dashboards/dashboards



Your company implements an Agile development methodology.
You plan to implement retrospectives at the end of each sprint.
Which three questions should you include? Each correct answer presents part of the solution.
Note: Each correct selection is worth one point.

  1. Who performed well?
  2. Who should have performed better?
  3. What could have gone better?
  4. What went well?
  5. What should we try next?

Answer(s): C,D,E



You manage a project by using Azure Boards, and you manage the project code by using Azure Repos.
You have a bug work item that has an ID of 123.
You need to set the work item state to Resolved.
What should you add to the commit message?

  1. #123 fixed
  2. #123 Resolved-
  3. Verifies #123-
  4. Resolves #123-

Answer(s): A

Explanation:

Correct:
* #123 fixed
* Fixes #123
Incorrect:
* #123 completes
* #123 Resolved
* Completed #123
* Resolves #AB-123
* Verifies #123
Note: Resolve work items on commit
Close work items by mentioning keywords in commit messages.
When you mention a work item in a commit that makes it to the default branch via one of the supported workflows, we will attempt to resolve that work item.
Keywords
The three supported keywords to trigger a resolution mention are fix, fixes, and fixed (case insensitive). Optionally, a colon can follow the keyword. Most forms of punctuation can precede or proceed the resolution mention, excluding another pound sign (#).
Examples
Fixes #123
This fixed #123!
Change behavior to fix: #123
Fixes #123 and fixes #124


Reference:

https://learn.microsoft.com/en-us/azure/devops/repos/git/resolution-mentions



Viewing page 43 of 81
Viewing questions 211 - 215 out of 398 questions


Post your Comments and Discuss Microsoft AZ-400 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!