microsoft AZ-204 Exam Questions

Questions for the AZ-204 were updated on : Jul 20 ,2024

Page 1 out of 17. Viewing questions 1-15 out of 252

Question 1 Topic 1, Case Study 1Case Study Question View Case

HOTSPOT
You need to configure Azure CDN for the Shipping web site.
Which configuration options should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:


Explanation:
Scenario: Shipping website
Use Azure Content Delivery Network (CDN) and ensure maximum performance for dynamic content while minimizing latency
and costs.
Tier: Standard
Profile: Akamai
Optimization: Dynamic site acceleration
Dynamic site acceleration (DSA) is available for Azure CDN Standard from Akamai, Azure CDN Standard from Verizon, and
Azure CDN Premium from Verizon profiles.
DSA includes various techniques that benefit the latency and performance of dynamic content. Techniques include route and
network optimization, TCP optimization, and more.
You can use this optimization to accelerate a web app that includes numerous responses that aren't cacheable. Examples
are search results, checkout transactions, or real-time data. You can continue to use core Azure CDN caching capabilities
for static data.
Reference:
https://docs.microsoft.com/en-us/azure/cdn/cdn-optimization-overview

Discussions
0 / 1000

Question 2 Topic 1, Case Study 1Case Study Question View Case

HOTSPOT
You need to correct the VM issues.
Which tools should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:


Explanation:
Box 1: Azure Backup
The VM is critical and has not been backed up in the past. The VM must enable a quick restore from a 7-day snapshot to
include in-place restore of disks in case of failure.
In-Place restore of disks in IaaS VMs is a feature of Azure Backup.
Performance: Accelerated Networking
Scenario: The VM shows high network latency, jitter, and high CPU utilization.
Box 2: Accelerated networking
The VM shows high network latency, jitter, and high CPU utilization.
Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking
performance. This high-performance path bypasses the host from the datapath, reducing latency, jitter, and CPU utilization,
for use with the most demanding network workloads on supported VM types.
Reference:
https://azure.microsoft.com/en-us/blog/an-easy-way-to-bring-back-your-azure-vm-with-in-place-restore/
Develop
Azure compute solutions

Discussions
0 / 1000

Question 3 Topic 2, Case Study 2Case Study Question View Case

HOTSPOT
You need to ensure that validation testing is triggered per the requirements.
How should you complete the code segment? To answer, select the appropriate values in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:


Explanation:
Box 1: RepositoryUpdated
When a new version of the ContentAnalysisService is available the previous seven days of content must be processed with
the new version to verify that the new version does not significantly deviate from the old version.
Box 2: service Box 3: imageCollection
Reference:
https://docs.microsoft.com/en-us/azure/devops/notifications/oob-supported-event-types
Develop Azure compute solutions

Discussions
0 / 1000

Question 4 Topic 2, Case Study 2Case Study Question View Case

You need to deploy the CheckUserContent Azure Function. The solution must meet the security and cost requirements.
Which hosting model should you use?

  • A. Premium plan
  • B. App Service plan
  • C. Consumption plan
Answer:

B

User Votes:
A
50%
B
50%
C
50%

Explanation:
Scenario:
You must minimize costs for all Azure services.
All Internal services must only be accessible from internal Virtual Networks (VNets).
Best for long-running scenarios where Durable Functions can't be used. Consider an App Service plan in the following
situations: You have existing, underutilized VMs that are already running other App Service instances.

You want to provide a custom image on which to run your functions. Predictive scaling and costs are required.


Note: When you create a function app in Azure, you must choose a hosting plan for your app. There are three basic hosting
plans available for Azure Functions: Consumption plan, Premium plan, and Dedicated (App Service) plan.
Incorrect Answers:
A: A Premium plan would be more costly. C: Need the VNET functionality.
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale

Discussions
vote your answer:
A
B
C
0 / 1000

Question 5 Topic 3, Case Study 3Case Study Question View Case

DRAG DROP
You need to deploy a new version of the LabelMaker application to ACR.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the
answer area and arrange them in the correct order.
Select and Place:

Answer:


Explanation:
Step 1: Build a new application image by using dockerfile
Step 2: Create an alias if the image with the fully qualified path to the registry
Before you can push the image to a private registry, youve to ensure a proper image name. This can be achieved using the
docker tag command. For demonstration purpose, well use Dockers hello world image, rename it and push it to ACR.
# pulls hello-world from the public docker hub
$ docker pull hello-world
# tag the image in order to be able to push it to a private registry
$ docker tag hello-word /hello-world
# push the image
$ docker push /hello-world
Step 3: Log in to the registry and push image
In order to push images to the newly created ACR instance, you need to login to ACR form the Docker CLI. Once logged in,
you can push any existing docker image to your ACR instance.
Scenario:
Coho Winery plans to move the application to Azure and continue to support label creation.
LabelMaker app
Azure Monitor Container Health must be used to monitor the performance of workloads that are deployed to Kubernetes
environments and hosted on Azure Kubernetes Service (AKS).
You must use Azure Container Registry to publish images that support the AKS deployment.
Reference:
https://thorsten-hans.com/how-to-use-a-private-azure-container-registry-with-kubernetes-9b86e67b93b6
https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-quick-task

Discussions
0 / 1000

Question 6 Topic 3, Case Study 3Case Study Question View Case

You need to access data from the user claim object in the e-commerce web app.
What should you do first?

  • A. Write custom code to make a Microsoft Graph API call from the e-commerce web app.
  • B. Assign the Contributor RBAC role to the e-commerce web app by using the Resource Manager create role assignment API.
  • C. Update the e-commerce web app to read the HTTP request header values.
  • D. Using the Azure CLI, enable Cross-origin resource sharing (CORS) from the e-commerce checkout API to the e- commerce web app.
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%

Explanation:
Methods to Get User Identity and Claims in a .NET Azure Functions App include: ClaimsPrincipal from the Request

Context
The ClaimsPrincipal object is also available as part of the request context and can be extracted from the
HttpRequest.HttpContext. User Claims from the Request Headers.

App Service passes user claims to the app by using special request headers.
Reference:
https://levelup.gitconnected.com/four-alternative-methods-to-get-user-identity-and-claims-in-a-net-azure-functions-app-
df98c40424bb

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 7 Topic 4, Case Study 4Case Study Question View Case

You need to store the user agreements.
Where should you store the agreement after it is completed?

  • A. Azure Storage queue
  • B. Azure Event Hub
  • C. Azure Service Bus topic
  • D. Azure Event Grid topic
Answer:

B

User Votes:
A
50%
B
50%
C
50%
D
50%

Explanation:
Azure Event Hub is used for telemetry and distributed data streaming.
This service provides a single solution that enables rapid data retrieval for real-time processing as well as repeated replay of
stored raw data. It can capture the streaming data into a file for processing and analysis.
It has the following characteristics:
low latency

capable of receiving and processing millions of events per second at least once delivery Reference:


https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 8 Topic 4, Case Study 4Case Study Question View Case

HOTSPOT
You need to implement the bindings for the CheckUserContent function.
How should you complete the code segment? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:


Explanation:
Box 1: [BlobTrigger(..)]
Box 2: [Blob(..)]
Azure Blob storage output binding for Azure Functions. The output binding allows you to modify and delete blob storage data
in an Azure Function.
The attribute's constructor takes the path to the blob and a FileAccess parameter indicating read or write, as shown in the
following example:
[FunctionName("ResizeImage")]
public static void Run(
[BlobTrigger("sample-images/{name}")] Stream image,
[Blob("sample-images-md/{name}", FileAccess.Write)] Stream imageSmall)
{
...
}
Scenario: You must create an Azure Function named CheckUserContent to perform the content checks.
The companys data science group built ContentAnalysisService which accepts user generated content as a string and
returns a probable value for inappropriate content. Any values over a specific threshold must be reviewed by an employee of
Contoso, Ltd.
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-output
Develop for Azure storage

Discussions
0 / 1000

Question 9 Topic 4, Case Study 4Case Study Question View Case

You need to configure the ContentUploadService deployment.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  • A. Add the following markup to line CS23: type: Private
  • B. Add the following markup to line CS24: osType: Windows
  • C. Add the following markup to line CS24: osType: Linux
  • D. Add the following markup to line CS23: type: Public
Answer:

A

User Votes:
A
50%
B
50%
C
50%
D
50%

Explanation:
Scenario: All Internal services must only be accessible from Internal Virtual Networks (VNets) There are three Network
Location types Private, Public and Domain Reference:
https://devblogs.microsoft.com/powershell/setting-network-location-to-private/

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 10 Topic 5, Case Study 5Case Study Question View Case

DRAG DROP
You need to add code at line PC32 in Processing.cs to implement the GetCredentials method in the Processing class.
How should you complete the code? To answer, drag the appropriate code segments to the correct locations. Each code
segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to
view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Answer:


Explanation:
Box 1: AzureServiceTokenProvider()
Box 2: tp.GetAccessTokenAsync("..")
Acquiring an access token is then quite easy. Example code:
private async Task GetAccessTokenAsync()
{
var tokenProvider = new AzureServiceTokenProvider();
return await tokenProvider.GetAccessTokenAsync("https://storage.azure.com/");
}
Reference: https://joonasw.net/view/azure-ad-authentication-with-azure-storage-and-managed-service-identity

Discussions
0 / 1000

Question 11 Topic 5, Case Study 5Case Study Question View Case

DRAG DROP
You need to ensure disaster recovery requirements are met.
What code should you add at line PC16?
To answer, drag the appropriate code fragments to the correct locations. Each code fragment may be used once, more than
once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Answer:


Explanation:
Scenario: Disaster recovery. Regional outage must not impact application availability. All DR operations must not be
dependent on application running and must ensure that data in the DR region is up to date.
Box 1: DirectoryTransferContext
We transfer all files in the directory.
Note: The TransferContext object comes in two forms: SingleTransferContext and DirectoryTransferContext. The former is
for transferring a single file and the latter is for transferring a directory of files.
Box 2: ShouldTransferCallbackAsync
The DirectoryTransferContext.ShouldTransferCallbackAsync delegate callback is invoked to tell whether a transfer should be
done.
Box 3: False
If you want to use the retry policy in Copy, and want the copy can be resume if break in the middle, you can use SyncCopy
(isServiceCopy = false).
Note that if you choose to use service side copy ('isServiceCopy' set to true), Azure (currently) doesn't provide SLA for that.
Setting 'isServiceCopy' to false will download the source blob loca
Reference: https://docs.microsoft.com/en-us/azure/storage/common/storage-use-data-movement-library
https://docs.microsoft.com/en-
us/dotnet/api/microsoft.windowsazure.storage.datamovement.directorytransfercontext.shouldtransfercallbackasync?view=az
ure-dotnet
Develop for Azure storage

Discussions
0 / 1000

Question 12 Topic 6, Case Study 6Case Study Question View Case

HOTSPOT
You need to configure Azure Cosmos DB.
Which settings should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:


Explanation:
Box 1: Strong
When the consistency level is set to strong, the staleness window is equivalent to zero, and the clients are guaranteed to
read the latest committed value of the write operation.
Scenario: Changes to the Order data must reflect immediately across all partitions. All reads to the Order data must fetch the
most recent writes.
Note: You can choose from five well-defined models on the consistency spectrum. From strongest to weakest, the models
are: Strong, Bounded staleness, Session, Consistent prefix, Eventual
Box 2: SQL
Scenario: You identify the following requirements for data management and manipulation: Order data is stored as
nonrelational JSON and must be queried using Structured Query Language (SQL).

Discussions
0 / 1000

Question 13 Topic 6, Case Study 6Case Study Question View Case

HOTSPOT
You need to retrieve all order line items from Order.json and sort the data alphabetically by the city.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:


Explanation:
Box 1: orders o
Scenario: Order data is stored as nonrelational JSON and must be queried using SQL.
Box 2:li
Box 3: o.line_items
Box 4: o.city
The city field is in Order, not in the 2s.
Develop for Azure storage

Discussions
0 / 1000

Question 14 Topic 7, Case Study 7Case Study Question View Case

DRAG DROP
You need to add markup at line AM04 to implement the ContentReview role.
How should you complete the markup? To answer, drag the appropriate json segments to the correct locations. Each json
segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to
view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Answer:


Explanation:
Box 1: allowedMemberTypes allowedMemberTypes specifies whether this app role definition can be assigned to users and
groups by setting to "User", or to other applications (that are accessing this application in daemon service scenarios) by
setting to "Application", or to both.
Note: The following example shows the appRoles that you can assign to users. "appId": "8763f1c4-f988-489c-a51e-
158e9ef97d6a",
"appRoles": [
{
"allowedMemberTypes": [
"User"
],
"displayName": "Writer",
"id": "d1c2ade8-98f8-45fd-aa4a-6d06b947c66f",
"isEnabled": true,
"description": "Writers Have the ability to create tasks.", "value": "Writer"
}
],
"availableToOtherTenants": false,
Box 2: User
Scenario: In order to review content a user must be part of a ContentReviewer role.
Box 3: value value specifies the value which will be included in the roles claim in authentication and access tokens.
Reference:
https://docs.microsoft.com/en-us/graph/api/resources/approle

Discussions
0 / 1000

Question 15 Topic 7, Case Study 7Case Study Question View Case

HOTSPOT
You need to add code at line AM09 to ensure that users can review content using ContentAnalysisService.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:


Explanation:
Box 1: "oauth2Permissions": ["login"]
oauth2Permissions specifies the collection of OAuth 2.0 permission scopes that the web API (resource) app exposes to
client apps. These permission scopes may be granted to client apps during consent.
Box 2: "oauth2AllowImplicitFlow":true
For applications (Angular, Ember.js, React.js, and so on), Microsoft identity platform supports the OAuth 2.0 Implicit Grant
flow.
Reference: https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-app-manifest

Discussions
0 / 1000
To page 2