Microsoft AZ-204 Practice Exams
Last updated on Nov 16,2026- Exam Code: AZ-204
- Exam Name: Developing Solutions for Microsoft Azure
- Certification Provider: Microsoft
- Latest update: Nov 16,2026
HOTSPOT
You need to secure the Shipping Function app.
How should you configure the app? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Scenario: Shipping Function app: Implement secure function endpoints by using app-level security and include Azure Active Directory (Azure AD).
Box 1: Function
Box 2: JSON based Token (JWT)
Azure AD uses JSON based tokens (JWTs) that contain claims
Box 3: HTTP
How a web app delegates sign-in to Azure AD and obtains a token
User authentication happens via the browser. The OpenID protocol uses standard HTTP protocol messages.
Reference: https://docs.microsoft.com/en-us/azure/active-directory/develop/authentication-scenarios
You are developing an internal website for employees to view sensitive data. The website uses Azure Active Directory (AAD) for authentication. You need to implement multifactor authentication for the website.
What should you do? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
- A . In Azure AD, create a new conditional access policy.
- B . In Azure AD, enable application proxy.
- C . Configure the website to use Azure AD B2C.
- D . In Azure AD conditional access, enable the baseline policy.
- E . Upgrade to Azure AD Premium.
A, E
Explanation:
Reference: https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-getstarted
You are developing an internal website for employees to view sensitive data. The website uses Azure Active Directory (AAD) for authentication. You need to implement multifactor authentication for the website.
What should you do? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
- A . In Azure AD, create a new conditional access policy.
- B . In Azure AD, enable application proxy.
- C . Configure the website to use Azure AD B2C.
- D . In Azure AD conditional access, enable the baseline policy.
- E . Upgrade to Azure AD Premium.
A, E
Explanation:
Reference: https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-getstarted
HOTSPOT
You need to correct the Azure Logic app error message.
Which configuration values should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Scenario: You test the Logic app in a development environment. The following error message displays:
‘400 Bad Request’
Troubleshooting of the error shows an HttpTrigger action to call the RequestUserApproval function.
Note: If the inbound call’s request body doesn’t match your schema, the trigger returns an HTTP 400 Bad Request error.
Box 1: function
If you have an Azure function where you want to use the system-assigned identity, first enable authentication for Azure functions.
Box 2: system-assigned
Your logic app or individual connections can use either the system-assigned identity or a single user-assigned identity, which you can share across a group of logic apps, but not both.
Reference: https://docs.microsoft.com/en-us/azure/logic-apps/create-managed-service-identity
HOTSPOT
You need to configure Azure App Service to support the REST API requirements.
Which values should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Plan: Standard
Standard support auto-scaling
Instance Count: 10
Max instances for standard is 10.
Scenario:
The REST API’s that support the solution must meet the following requirements:
✑ Allow deployment to a testing location within Azure while not incurring additional costs.
✑ Automatically scale to double capacity during peak shipping times while not causing application downtime.
✑ Minimize costs when selecting an Azure payment model.
References: https://azure.microsoft.com/en-us/pricing/details/app-service/plans/
DRAG DROP
You plan to create a Docker image that runs an ASP.NET Core application named ContosoApp. You have a setup script named setupScript.ps1 and a series of application files including ContosoApp.dll.
You need to create a Dockerfile document that meets the following requirements:
Call setupScripts.ps1 when the container is built.
Run ContosoApp.dll when the container starts.
The Dockerfile document must be created in the same folder where ContosoApp.dll and setupScript.ps1 are stored.
Which five commands should you use to develop the solution? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order.

Explanation:
Box 1: CMD [..]
Cmd starts a new instance of the command interpreter, Cmd.exe.
Syntax: CMD <string>
Specifies the command you want to carry out.
Box 2: FROM microsoft/aspnetcore-build:latest
Box 3: WORKDIR /apps/ContosoApp
Bxo 4: COPY ./ .
Box 5: RUN powershell ./setupScript.ps1
Your company is developing an Azure API.
You need to implement authentication for the Azure API.
You have the following requirements:
✑ All API calls must be secure.
✑ Callers to the API must not send credentials to the API.
Which authentication mechanism should you use?
- A . Basic
- B . Anonymous
- C . Managed identity
- D . Client certificate
C
Explanation:
Use the authentication-managed-identity policy to authenticate with a backend service using the managed identity of the API Management service. This policy essentially uses the managed identity to obtain an access token from Azure Active Directory for accessing the specified resource. After successfully obtaining the token, the policy will set the value of the token in the Authorization header using the Bearer scheme.
Reference: https://docs.microsoft.com/bs-cyrl-ba/azure/api-management/api-management-authentication-policies
HOTSPOT
You are building a software-as-a-service (SaaS) application that analyzes DNA data that will run on Azure virtual machines (VMs) in an availability zone. The data is stored on managed disks attached to the VM. The performance of the analysis is determined by the speed of the disk attached to the VM.
You have the following requirements:
• The application must be able to quickly revert to the previous day’s data if a systemic error is detected.
• The application must minimize downtime in the case of an Azure datacenter outage.
You need to provision the managed disk for the VM to maximize performance while meeting the requirements.
Which type of Azure Managed Disk should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.


HOTSPOT
You are developing an Azure App Service hosted ASP.NET Core web app to deliver video on-demand streaming media. You enable an Azure Content Delivery Network (CDN) Standard for the web endpoint. Customer videos are downloaded from the web app by using the following example URL.: http://www.contoso.com/content.mp4?quality=1
All media content must expire from the cache after one hour. Customer videos with varying quality must be delivered to the closest regional point of presence (POP) node.
You need to configure Azure CDN caching rules.
Which options should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Box 1: Override
Override: Ignore origin-provided cache duration; use the provided cache duration instead.
This will not override cache-control: no-cache.
Set if missing: Honor origin-provided cache-directive headers, if they exist; otherwise, use the provided cache duration.
Incorrect:
Bypass cache: Do not cache and ignore origin-provided cache-directive headers.
Box 2: 1 hour
All media content must expire from the cache after one hour.
Box 3: Cache every unique URL
Cache every unique URL: In this mode, each request with a unique URL, including the query string, is treated as a unique asset with its own cache. For example, the response from the origin server for a request for example.ashx?q=test1 is cached at the POP node and returned for subsequent caches with the same query string. A request for example.ashx?q=test2 is cached as a separate asset with its own time-to-live setting.
Incorrect Answers:
Bypass caching for query strings: In this mode, requests with query strings are not cached at the CDN POP node. The POP node retrieves the asset directly from the origin server and passes it to the requestor with each request.
Ignore query strings: Default mode. In this mode, the CDN point-of-presence (POP) node passes the query strings from the requestor to the origin server on the first request and caches the asset. All subsequent requests for the asset that are served from the POP ignore the query strings until the cached asset expires.
Reference: https://docs.microsoft.com/en-us/azure/cdn/cdn-query-string
You are developing a complex workflow by using Azure Durable Functions.
During testing you observe that the results of the workflow differ based on how many instances of the Azure Function are running.
You need to resolve the issue.
What should you do?
- A . Ensure that all Orchestrator code is deterministic.
- B . Read all state data from the durable function context
- C . Configure the Azure Our able f unction to run on an App Service Plan with one instance.
- D . Implement the monitor pattern within the workflow.