Free AZ-204 Exam Braindumps

Pass your Developing Solutions for Microsoft Azure exam with these free Questions and Answers

Page 2 of 73
QUESTION 1

- (Exam Topic 8)
You are implementing an Azure API app that uses built-in authentication and authorization functionality. All app actions must be associated with information about the current user.
You need to retrieve the information about the current user.
What are two possible ways to achieve the goal? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

  1. A. HTTP headers
  2. B. environment variables
  3. C. /.auth/me HTTP endpoint
  4. D. /.auth/login endpoint

Correct Answer: AC
A: After App Service Authentication has been configured, users trying to access your API are prompted to sign in with their organizational account that belongs to the same Azure AD as the Azure AD application used to secure the API. After signing in, you are able to access the information about the current user through the HttpContext.Current.User property.
C: While the server code has access to request headers, client code can access GET /.auth/me to get the same access tokens (
References:
https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-auth-aad https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/connect-to-api-secured-with-aad

QUESTION 2

- (Exam Topic 6)
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.
AZ-204 dumps exhibit
Solution:
A picture containing timeline Description automatically generated
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, you’ve to ensure a proper image name. This can be achieved using the docker tag command. For demonstration purpose, we’ll use Docker’s 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

Does this meet the goal?

  1. A. Yes
  2. B. No

Correct Answer: A

QUESTION 3

- (Exam Topic 4)
You need to insert code at line LE03 of LoginEvent.cs to ensure that all authentication events are processed correctly.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
AZ-204 dumps exhibit
Solution:
Box 1: id
id is a unique identifier for the event.
Box 2: eventType
eventType is one of the registered event types for this event source.
Box 3: dataVersion
dataVersion is the schema version of the data object. The publisher defines the schema version.
Scenario: Authentication events are used to monitor users signing in and signing out. All authentication events must be processed by Policy service. Sign outs must be processed as quickly as possible.
The following example shows the properties that are used by all event publishers: [
{
"topic": string, "subject": string, "id": string, "eventType": string, "eventTime": string, "data":{
object-unique-to-each-publisher
},
"dataVersion": string, "metadataVersion": string
}
]
Reference:
https://docs.microsoft.com/en-us/azure/event-grid/event-schema

Does this meet the goal?

  1. A. Yes
  2. B. No

Correct Answer: A

QUESTION 4

- (Exam Topic 8)
You are developing an ASP.NET Core Web API web service that uses Azure Application Insights to monitor performance and track events.
You need to enable logging and ensure that log messages can be correlated to events tracked by Application Insights.
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.
AZ-204 dumps exhibit
Solution:
Box 1: ApplicationInsightsLoggerOptions
If you want to include the EventId and EventName properties, then add the following to the ConfigureServices method:
services AddOptions() Configure(o => o.IncludeEventId = true);
Box 2: IncludeEventID
Box 3: ApplicationServices
In Asp.Net core apps it turns out that trace logs do not show up in Application Insights out of the box. We need to add the following code snippet to our Configure method in Startup.cs:
loggerFactory.AddApplicationInsights(app.ApplicationServices, logLevel); References:
https://blog.computedcloud.com/enabling-application-insights-trace-logging-in-asp-net-core/

Does this meet the goal?

  1. A. Yes
  2. B. No

Correct Answer: A

QUESTION 5

- (Exam Topic 8)
You are developing Azure WebJobs.
You need to recommend a WebJob type for each scenario.
Which WebJob type should you recommend? To answer, drag the appropriate WebJob types to the correct scenarios. Each WebJob type 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.
AZ-204 dumps exhibit
Solution:
Box 1: Continuous
Continuous runs on all instances that the web app runs on. You can optionally restrict the WebJob to a single instance.
Box 2: Triggered
Triggered runs on a single instance that Azure selects for load balancing. Box 3: Continuous
Continuous supports remote debugging. Note:
The following table describes the differences between continuous and triggered WebJobs.
AZ-204 dumps exhibit
References:
https://docs.microsoft.com/en-us/azure/app-service/web-sites-create-web-jobs

Does this meet the goal?

  1. A. Yes
  2. B. No

Correct Answer: A

Page 2 of 73

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