Microsoft Certified: Azure Developer Associate (AZ-204) practice questions

228 free questions with answers and explanations.

Practice test
  1. 151.A company is developing a highly sensitive document processing application using Azure Kubernetes Service (AKS). The application processes confidential financial data, and regulatory compliance requires that all data at rest, including data stored in persistent volumes mounted to AKS pods, must be encrypted with customer-managed keys (CMK) from Azure Key Vault. Which solution should the developer implement to ensure that AKS persistent volumes are encrypted with CMK?Implement Azure security
  2. 152.A developer is building an Azure Function App that needs to securely access secrets stored in Azure Key Vault. The Function App is deployed to an Azure App Service Plan. The developer wants to avoid hardcoding credentials and ensure that the Function App can authenticate to Key Vault automatically using its own identity. Which authentication method should the developer implement?Implement Azure security
  3. 153.A developer is building a multi-tenant SaaS application on Azure. The application's backend consists of Azure Functions and Azure App Services. Users from different Azure Active Directory (AAD) tenants will access the application. The application needs to authenticate users and then authorize their access to specific resources based on their tenant and assigned roles within that tenant. The application itself is registered in the developer's AAD tenant. Which authentication and authorization flow should the developer implement to allow users from other AAD tenants to securely sign in and access the application?Implement Azure security
  4. 154.A company is developing an Azure Function App that needs to connect to an SFTP server hosted on a virtual machine within an Azure Virtual Network (VNet). The SFTP server is only accessible from within the VNet. The Azure Function App is deployed to a Consumption Plan. Which networking configuration is required to enable the Azure Function App to securely connect to the SFTP server while maintaining the serverless benefits of the Consumption Plan?Implement Azure security
  5. 155.A developer is configuring Azure AD Conditional Access policies for a critical application. The goal is to enforce multi-factor authentication (MFA) for users accessing the application from outside the corporate network, but allow single sign-on (SSO) for users within the corporate network. Which combination of conditions and access controls should be used?Implement Azure security
  6. 156.A company is migrating an on-premises application that uses Windows integrated authentication to Azure. The application needs to authenticate users against their existing Active Directory Domain Services (AD DS) without synchronizing user hashes to Azure AD. Which Azure AD service should be configured for this purpose?Implement Azure security
  7. 157.A company is developing a new web API that exposes sensitive customer data. The API is hosted on an Azure App Service. To protect against common web vulnerabilities like SQL injection and cross-site scripting (XSS), and to inspect incoming traffic for malicious patterns, the security team requires a Web Application Firewall (WAF) to be deployed in front of the API. Which Azure service provides a WAF capability that can protect an Azure App Service?Implement Azure security
  8. 158.A developer is building a web API that exposes sensitive customer data. The API is hosted on Azure App Service. To protect against common web vulnerabilities such as SQL injection and cross-site scripting (XSS), which Azure service should be implemented in front of the App Service?Implement Azure security
  9. 159.A financial services company is developing a new serverless application using Azure Functions. The application will process highly sensitive customer financial data and must comply with strict regulatory requirements for data encryption at rest, including customer-managed encryption keys (CMEK). Which Azure storage encryption option should be used for the data stored by the Azure Function?Implement Azure security
  10. 160.A developer is building a multi-tenant SaaS application on Azure. The application's backend API is secured with Azure Active Directory (AAD). When a new customer signs up, their AAD tenant needs to be able to authenticate users against the application. The application should dynamically discover the necessary AAD endpoints for each customer's tenant. Which Azure AD authentication approach is most suitable for this scenario?Implement Azure security
  11. 161.A company is developing a new mobile application that will access an Azure API Management (APIM) instance. The mobile application needs to authenticate users and then use the resulting token to access the API. Which authentication method should the mobile application use to acquire the token from Azure AD?Implement Azure security
  12. 162.A security team has mandated that all Azure Storage Accounts containing highly sensitive data must only be accessible from a specific Azure Virtual Network (VNet) and from a designated set of on-premises public IP addresses. Any access attempts from outside these approved sources must be blocked. The Storage Account will store blobs and files. Which combination of Azure networking features should be configured on the Storage Account to enforce this policy?Implement Azure security
  13. 163.A developer is implementing a RESTful API using Azure API Management (APIM) that exposes sensitive customer data. The API backend is hosted on an Azure App Service. To enhance security, all requests to the API must first be authenticated using OAuth 2.0 with Azure Active Directory (AAD) and then authorized based on roles assigned to the user. Which APIM policy should be used to enforce role-based authorization?Implement Azure security
  14. 164.A developer is implementing role-based access control (RBAC) for an Azure Storage Account. A new custom role needs to be created that allows a specific Azure Function App to read and list blobs, but not write or delete them. Which `actions` property should be included in the custom role definition?Implement Azure security
  15. 165.A company is developing an Azure Function App that processes sensitive customer data. The function needs to store connection strings and API keys securely. Which Azure service should be used to manage these secrets?Implement Azure security
  16. 166.A company is developing an Azure Function App that needs to interact with an Azure Storage Account to read and write blobs. The security team has mandated that the Function App must use a managed identity for authentication to the Storage Account and that access should be restricted to specific blob containers. Which Azure RBAC role, scoped to the specific blob container, should be assigned to the Azure Function App's managed identity to provide the necessary permissions while adhering to the principle of least privilege?Implement Azure security
  17. 167.A developer is designing a system where an Azure Function App needs to publish messages to an Azure Service Bus topic. The Function App should have minimal necessary permissions. Which built-in Azure role should be assigned to the Function App's managed identity for this purpose?Implement Azure security
  18. 168.A company is developing a new serverless application using Azure Functions. The application will store customer data in Azure Cosmos DB. Due to strict compliance requirements, all data at rest in Cosmos DB must be encrypted using customer-managed keys (CMK) stored in Azure Key Vault. The Azure Function needs to be able to access the Cosmos DB account, which has been configured to use a system-assigned managed identity. The Cosmos DB account's Key Vault access policy has been configured to grant the Cosmos DB account's managed identity the `Get`, `Wrap Key`, and `Unwrap Key` permissions to the encryption key. Which of the following describes the most secure and appropriate method for the Azure Function to authenticate to Azure Cosmos DB to perform read/write operations?Implement Azure security
  19. 169.A company is migrating an existing web application to Azure App Service. The application uses a custom authentication system that validates user credentials against an on-premises Active Directory. The company wants to integrate this application with Azure Active Directory (AAD) to leverage AAD's security features, but users must continue to authenticate primarily against the on-premises Active Directory without syncing password hashes to the cloud. Which Azure AD authentication method should be used to meet these requirements?Implement Azure security
  20. 170.A financial services company is developing a highly sensitive document management system using Azure Blob Storage. Compliance regulations require that all data at rest in the storage account must be encrypted using encryption keys that are managed and controlled solely by the customer, not by Microsoft. This includes the ability to revoke access to the keys at any time. Which encryption solution should be implemented for the Azure Storage account?Implement Azure security
  21. 171.A company is migrating an existing on-premises web application to Azure App Service. The application uses Windows Integrated Authentication (WIA) and requires users to authenticate against their on-premises Active Directory. The company wants to maintain the single sign-on experience for users without synchronizing password hashes to Azure AD or deploying AD FS. Which Azure AD authentication method is appropriate for this scenario?Implement Azure security
  22. 172.A developer is building an ASP.NET Core web application hosted on Azure App Service. The application needs to authenticate users from a multi-tenant Azure Active Directory (AAD) tenant. Which authentication flow is most suitable for this scenario, allowing users to sign in without providing their credentials to the application directly?Implement Azure security
  23. 173.A company is developing a new serverless application using Azure Functions. The application will process sensitive customer data and store it in Azure Cosmos DB. Security requirements mandate that all communication between the Azure Function and Cosmos DB must be encrypted end-to-end, and the Function must connect to Cosmos DB without exposing its network traffic to the public internet. Which Azure networking feature should be used to meet these requirements?Implement Azure security
  24. 174.A company is developing an Azure Function that processes orders. The function needs to connect to an Azure SQL Database. To ensure the connection is secure and uses the principle of least privilege, which connection string component should be avoided, and what is the best practice for secure access?Implement Azure security
  25. 175.A developer is creating an Azure Function that needs to interact with an Azure Storage Account. To enhance security, the function should authenticate to the storage account using a managed identity. Which type of managed identity should the developer use if the function app is already deployed and needs to share the identity with other Azure resources?Implement Azure security
  26. 176.A company is developing an Azure API Management (APIM) instance that exposes several backend APIs. These backend APIs are hosted on Azure App Services and are secured using Azure Active Directory authentication. The APIM instance needs to authenticate to the backend APIs using its own identity, without exposing any credentials to the APIM policy. Which mechanism should the developer use to enable APIM to securely authenticate to the backend App Services?Implement Azure security
  27. 177.A company is developing a new serverless application that processes incoming sensor data from IoT devices. The application needs to execute small, event-driven functions in response to data ingestion, with minimal operational overhead. The solution must automatically scale based on the volume of incoming data and only incur costs when functions are actively running. Which Azure compute solution is most appropriate for this scenario?Develop Azure compute solutions
  28. 178.A company is deploying a new web application that needs to handle intermittent, unpredictable traffic spikes. The application is built using .NET Core and is containerized. It needs to scale down to zero instances when idle to minimize costs, and then scale up rapidly to handle incoming requests. Which Azure compute solution is BEST suited for this scenario?Develop Azure compute solutions
  29. 179.An existing application is composed of several independent components that are currently running on separate physical servers. The company wants to migrate these components to Azure, maintaining isolation between them but consolidating them onto shared infrastructure to reduce costs. Each component requires a specific operating system configuration and runtime environment that cannot be easily containerized. The company needs to manage dependencies and updates for each component independently. Which Azure compute solution is the most appropriate?Develop Azure compute solutions
  30. 180.A development team is deploying a new web application to Azure. The application consists of several microservices, each packaged as a Docker container. The team requires a fully managed service that can orchestrate these containers, provide automatic scaling, and handle service discovery without requiring them to manage the underlying virtual machines. Which Azure compute solution is BEST suited for this scenario?Develop Azure compute solutions
  31. 181.A logistics company uses an Azure App Service web application to track shipments. During peak hours, the application experiences slow response times due to increased user traffic. The company wants to ensure consistent performance during these spikes without over-provisioning resources during off-peak hours. Which App Service feature should be configured to address this requirement efficiently?Develop Azure compute solutions
  32. 182.A data analytics company uses Azure Functions to process incoming telemetry data from IoT devices. The data arrives in batches and each batch needs to be processed within 5 minutes. However, some processing tasks can occasionally take up to 7 minutes due to large data volumes or external service delays. The function is configured with a default timeout. What is the MINIMUM timeout setting (in minutes) required for the Azure Function to ensure all batches are processed successfully without premature termination, assuming the function needs to handle the occasional 7-minute processing time?Develop Azure compute solutions
  33. 183.A company is modernizing its on-premises data processing workflows by migrating them to Azure. The workflows involve running a series of complex, long-running computational tasks that can be broken down into many independent sub-tasks. These sub-tasks need to be executed in parallel across a pool of compute nodes, and the company requires a managed service that can automatically provision and scale these nodes, distribute tasks, and handle task failures. Which Azure compute solution is BEST suited for this scenario?Develop Azure compute solutions
  34. 184.A company is designing a system to process large volumes of sensor data. The data arrives continuously and needs to be processed in real-time by a series of stateless microservices. These microservices are containerized and need to scale dynamically based on the incoming data volume, potentially processing millions of events per second. The company wants a fully managed solution that abstracts away server infrastructure and provides advanced routing and traffic management capabilities. Which Azure compute solution is best suited for this?Develop Azure compute solutions
  35. 185.A company is developing a new serverless application that processes incoming telemetry data from IoT devices. The application needs to execute small, event-driven code snippets in response to data arrival, scale automatically based on demand, and incur costs only when the code is actively running. Which Azure compute solution is BEST suited for this scenario?Develop Azure compute solutions
  36. 186.A financial institution is deploying a new service to Azure Kubernetes Service (AKS). The service requires persistent storage that can be accessed concurrently by multiple pods across different nodes within the AKS cluster. The storage solution must also support read-write access from multiple pods simultaneously. Which Azure storage solution is MOST appropriate for this requirement?Develop Azure compute solutions
  37. 187.A developer is configuring an Azure Function with an HTTP trigger. The function needs to accept JSON payloads up to 10 MB in size. The default timeout for HTTP-triggered functions in a Consumption plan is 5 minutes. The processing logic for some payloads might take up to 7 minutes due to complex calculations. Which configuration change is MOST critical to ensure the function completes successfully?Develop Azure compute solutions
  38. 188.A company is deploying a new containerized application to Azure Kubernetes Service (AKS). The application requires persistent storage that can be shared across multiple pods and dynamically provisioned as needed. The storage solution must be highly available and resilient to node failures. Which type of Azure storage should be used for this requirement?Develop Azure compute solutions
  39. 189.A company is redesigning its backend infrastructure to use a message-driven architecture. They are using Azure Service Bus queues for reliable message delivery. A critical requirement is to prevent poison messages from indefinitely blocking the queue or being repeatedly processed, which could lead to resource exhaustion or data corruption. What Azure Service Bus feature should be configured to handle these problematic messages effectively?Develop Azure compute solutions
  40. 190.A company is deploying a new web application that requires a highly scalable and fault-tolerant backend. The application processes user-uploaded images, which are then stored in Azure Blob Storage. The image processing is a CPU-intensive task and can take varying amounts of time. The company wants to minimize operational overhead and only pay for compute resources when the processing is actively running. Which Azure compute solution is most appropriate for the image processing workload?Develop Azure compute solutions
  41. 191.A media company uses Azure Container Instances (ACI) to run a series of short-lived, burstable containerized tasks for video transcoding. Each task processes a segment of a video, and the number of tasks varies significantly throughout the day. The company wants to optimize costs by only paying for the exact compute resources consumed during the container's execution, without managing any underlying virtual machines or orchestration. Which ACI billing model is most relevant for this scenario?Develop Azure compute solutions
  42. 192.A manufacturing company uses an Azure App Service web application to display real-time production line data. During peak shifts, the application experiences high load, and it must scale out to ensure responsiveness. During off-peak hours, the application should scale in to reduce costs. The company wants to implement a robust autoscaling solution that adjusts the number of instances based on the average CPU utilization of the existing instances. What is the PRIMARY metric that should be configured for the autoscaling rule?Develop Azure compute solutions
  43. 193.A company is developing an Azure Function that needs to periodically fetch data from an external API, transform it, and store it in Azure Cosmos DB. The function should run automatically every hour without requiring any explicit HTTP requests. Which trigger type is most suitable for this Azure Function?Develop Azure compute solutions
  44. 194.A manufacturing company uses an Azure App Service web application to display real-time production metrics. During peak shifts, the application experiences high load, requiring increased compute capacity. The company wants to automatically adjust the number of instances based on CPU utilization to ensure responsiveness and optimize costs. Which App Service feature should be configured?Develop Azure compute solutions
  45. 195.A developer needs to deploy a legacy ASP.NET web application to Azure. The application requires specific older versions of .NET Framework components and has some dependencies on Windows-specific features. The company wants to migrate this application with minimal code changes while ensuring high availability and scalability. Which Azure compute solution should the developer choose?Develop Azure compute solutions
  46. 196.A software company is developing a new cloud-native application that needs to run containerized microservices. The application experiences unpredictable traffic patterns with frequent scaling to zero during idle periods to minimize costs. The team wants to avoid managing Kubernetes clusters directly but requires advanced traffic management capabilities, such as traffic splitting for A/B testing and revision management for safe deployments. Which Azure compute solution is the MOST suitable for this scenario?Develop Azure compute solutions
  47. 197.A developer is creating an Azure Function that needs to access a secret (e.g., a database connection string) securely. The secret should not be hardcoded in the application code or stored directly in the Function App settings. The solution must follow best practices for secret management and integrate seamlessly with the Azure Function environment. Which Azure service should be used to store and retrieve the secret?Develop Azure compute solutions
  48. 198.A company is developing a new application that will process a high volume of messages from an Azure Service Bus queue. The processing involves complex business logic, and each message must be processed reliably, even if there are transient errors. The application needs to be able to scale out automatically based on the queue length and process messages concurrently. Which Azure Functions trigger and hosting plan combination is MOST appropriate for this scenario?Develop Azure compute solutions
  49. 199.A development team is building a new microservices application that will run in Azure. Each microservice is packaged as a Docker container. The team needs a solution that allows them to quickly deploy and run individual containers without managing underlying virtual machines or a full Kubernetes cluster. The solution should also provide per-second billing and be suitable for burstable, short-lived workloads. Which Azure compute service should they choose?Develop Azure compute solutions
  50. 200.A global media company is deploying a new video streaming platform that requires a highly available and scalable backend. The platform consists of several microservices, some of which require GPU acceleration for video transcoding, while others are standard web APIs. The company needs to manage container orchestration, ensure high availability, and optimize cost by using different types of compute resources within the same cluster. Which Azure compute solution is MOST appropriate for this scenario?Develop Azure compute solutions