AZ-305 sample exam questions

15 exam-style questions for Microsoft AZ-305: Designing Azure Infrastructure Solutions, with answers and explanations. Take them as a timed practice exam first if you want a score out of 1000.

  1. Question 1Multiple responseTopic 1
    You are designing a large Azure environment that will contain many subscriptions.
    You plan to use Azure Policy as part of a governance solution.
    To which three scopes can you assign Azure Policy definitions? Each correct answer presents a complete solution.
    NOTE: Each correct selection is worth one point.
    1. A
      Azure Active Directory (Azure AD) administrative units
    2. B
      Azure Active Directory (Azure AD) tenants
    3. C
      subscriptions
    4. D
      compute resources
    5. E
      resource groups
    6. F
      management groups
    Show answer

    Correct answer: C, E, F

    Why

    Azure Policy can be assigned at management group, subscription, resource group (and individual resource) scope within the ARM hierarchy. Entra ID tenants and administrative units are identity scopes, not ARM policy scopes; 'compute resources' is not a valid answer in this question's intended set.

  2. Question 2HotspotTopic 1
    HOTSPOT

    You have an Azure subscription that contains an Azure key vault named KV1 and a virtual machine named VM1. VM1 runs Windows Server 2022: Azure Edition.

    You plan to deploy an ASP.Net Core-based application named App1 to VM1.

    You need to configure App1 to use a system-assigned managed identity to retrieve secrets from KV1. The solution must minimize development effort.

    What should you do? To answer, select the appropriate options in the answer area.

    NOTE: Each correct selection is worth one point.

    Configure App1 to use OAuth 2.0:Authorization code grant flows / Client credentials grant flows / Implicit grant flows
    Configure App1 to use a REST API call to retrieve an authentication token from the:Azure Instance Metadata Service (MDS) endpoint / OAuth 2.0 access token endpoint of Azure AD / OAuth 2.0 access token endpoint of Microsoft Identity Platform
    Show answer
    • Configure App1 to use OAuth 2.0: Client credentials grant flows
    • Configure App1 to use a REST API call to retrieve an authentication token from the: Azure Instance Metadata Service (MDS) endpoint
    Why

    A managed identity is an app-only identity, so it uses the OAuth 2.0 client credentials flow with no user involved. Code on the VM gets the token with a simple REST call to the Instance Metadata Service (IMDS) endpoint 169.254.169.254, which needs no secrets. The Entra token endpoints would require client credentials.

  3. Question 3Single choiceTopic 2
    You are designing an app that will use Azure Cosmos DB to collate sales from multiple countries.

    You need to recommend an API for the app. The solution must meet the following requirements:

    • Support SQL queries.
    • Support geo-replication.
    • Store and access data relationally.

    Which API should you recommend?
    1. A
      Apache Cassandra
    2. B
      PostgreSQL
    3. C
      MongoDB
    4. D
      NoSQL
    Show answer

    Correct answer: B

    Why

    Azure Cosmos DB for PostgreSQL stores data relationally, supports standard SQL queries, and can be geo-replicated with cross-region read replicas. The NoSQL API supports SQL-like queries but is document-based, not relational, and Cassandra and MongoDB APIs are non-relational and do not use SQL.

  4. Question 4HotspotTopic 2
    HOTSPOT

    You have an Azure subscription.

    You need to deploy a solution that will provide point-in-time restore for blobs in storage accounts that have blob versioning and blob soft delete enabled.

    Which type of blob should you create, and what should you enable for the accounts? To answer, select the appropriate options in the answer area.

    NOTE: Each correct selection is worth one point.

    Blob type:Append / Block / Page
    Enable:A stored access policy / Immutable blob storage / Object replication / The change feed
    Show answer
    • Blob type: Block
    • Enable: The change feed
    Why

    Point-in-time restore works only for block blobs in general purpose v2 accounts and requires blob versioning, soft delete and the blob change feed to be enabled. Page and append blobs are not supported, and immutability, object replication and stored access policies are unrelated.

  5. Question 5Drag and dropTopic 2
    DRAG DROP

    You have a 500-TB, on premises Microsoft SQL Server database named DB1.

    You have an on-premises datacenter that contains virtual machines. The virtual machines host database, web, file and application resources.

    You have an Azure subscription.

    You need to migrate DB1 and the virtual machines to Azure. The solution must meet the following requirements:

    • During the migration of DB1, data cannot be transmitted over the internet, and the impact on the internet must be minimized.
    • The migration of the virtual machines must support a test migration before the production migration.
    • During the migration of the virtual machines, downtime must be minimized.

    What should you use for each migration? To answer, drag the appropriate services to the correct targets. Each service 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.

    Move each item to the matching row:

    • Azure Data Box
    • Azure Migrate
    • Azure Queue Storage
    • Azure Site Recovery
    • Database Migration Assistant (DMA)
    • DB1:
    • Virtual machines:
    Show answer
    • DB1: Azure Data Box
    • Virtual machines: Azure Migrate
    Why

    A 500 TB database that must not cross the internet is moved offline with Azure Data Box (Data Box Heavy) devices. Azure Migrate server migration supports test migrations before cutover and replication-based migration that minimizes downtime. DMA and Site Recovery are not the intended tools here.

  6. Question 6HotspotTopic 3
    HOTSPOT

    You have an on-premises web server farm that contains 10 servers. The servers run Windows Server 2016 and host a .NET Framework application named App1. The state data for App1 is maintained by using a database named DB1. The usage patterns of App1 vary significantly.

    You plan to perform the following actions:

    • Migrate App1 to Azure.
    • Migrate DB1 to an Azure SQL database.

    You need to recommend a virtual machine-based solution to host App1. The solution must meet the following requirements:

    • Minimize how long it takes to scale out resources during surges in demand for App1.
    • Ensure minimum capacity availability of the virtual machines at all times.
    • Ensure that the solution can be recovered if an Azure region fails.
    • Minimize compute costs.

    What should you include in the recommendation? To answer, select the appropriate options in the answer area.

    NOTE: Each correct selection is worth one point.

    Compute resources:Azure virtual machines in an availability set / Azure Virtual Machine Scale Sets in Flexible orchestration mode / Azure Virtual Machine Scale Sets in Uniform orchestration mode
    To minimize costs:A capacity reservation group / An eviction policy / Spot Priority Mix
    Show answer
    • Compute resources: Azure Virtual Machine Scale Sets in Flexible orchestration mode
    • To minimize costs: Spot Priority Mix
    Why

    Spot Priority Mix is a feature of Flexible orchestration scale sets: a base of standard VMs guarantees minimum capacity while extra scale-out capacity uses cheap Spot VMs. Capacity reservations add cost, an eviction policy alone does not mix priorities, and availability sets do not autoscale.

  7. Question 7Single choiceTopic 3
    You have a business-critical app named App1 that is hosted in an Azure Kubernetes Service (AKS) cluster.

    You need to recommend a configuration solution for the cluster. The solution must meet the following requirements:

    • Maintain availability during planned datacenter maintenance events.
    • Support dynamic scaling in response to workload demands.
    • Minimize downtime if a datacenter fails.

    What should you recommend?
    1. A
      an AKS cluster deployed to a single availability zone
    2. B
      an AKS cluster with multiple node pools deployed to a single availability zone
    3. C
      an AKS cluster that has nodes deployed to different Azure regions
    4. D
      an AKS cluster with availability zones enabled
    Show answer

    Correct answer: D

    Why

    Enabling availability zones on the AKS cluster spreads nodes across separate datacenters in the region, so the app stays up during datacenter maintenance or failure, and the cluster autoscaler still scales dynamically. Single-zone clusters share one datacenter, and a single AKS cluster cannot span multiple regions.

  8. Question 8Single choiceTopic 4
    You are designing an app that will include two components. The components will communicate by sending messages via a queue.

    You need to recommend a solution to process the messages by using a First in, First out (FIFO) pattern.

    What should you include in the recommendation?
    1. A
      storage queues with a custom metadata setting
    2. B
      Azure Service Bus queues with partitioning enabled
    3. C
      Azure Service Bus queues with sessions enabled
    4. D
      storage queues with a stored access policy
    Show answer

    Correct answer: C

    Why

    Azure Service Bus sessions guarantee ordered, first-in first-out processing of related messages by locking a session to one receiver. Storage queues do not guarantee ordering regardless of metadata or access policies, and partitioning spreads messages across brokers, which can break ordering.

  9. Question 9HotspotTopic 4
    HOTSPOT

    You have an Azure subscription that contains the resources shown in the following table.



    VNet1, VNet2, and VNet3 each has multiple virtual machines connected. The virtual machines use the Azure DNS service for name resolution.

    You need to recommend an Azure Monitor log routing solution that meets the following requirements:

    • Ensures that the logs collected from the virtual machines and sent to Workspace1 are routed over the Microsoft backbone network
    • Minimizes administrative effort

    What should you include in the recommendation? To answer, select the appropriate options in the answer area.

    Minimum number of Azure Monitor Private Link Scope (AMPLS) objects:1 / 2 / 3
    Minimum number of private endpoints:1 / 2 / 3
    Show answer
    • Minimum number of Azure Monitor Private Link Scope (AMPLS) objects: 1
    • Minimum number of private endpoints: 2
    Why

    All the VNets share the same DNS, so Microsoft recommends a single AMPLS to avoid conflicting DNS records. Peered VNet1 and VNet2 can share one private endpoint, but isolated VNet3 needs its own, which makes two private endpoints.

  10. Question 10Single choiceTopic 5
    After you migrate App1 to Azure, you need to enforce the data modification requirements to meet the security and compliance requirements.
    What should you do?
    1. A
      Create an access policy for the blob service.
    2. B
      Implement Azure resource locks.
    3. C
      Create Azure RBAC assignments.
    4. D
      Modify the access level of the blob service.
    Show answer

    Correct answer: A

    Why

    The requirement that App1 data cannot be modified or deleted for a set period is met by a time-based retention (immutability) policy, configured as an access policy on the blob container. Resource locks protect only the storage account resource, RBAC can be bypassed by owners, and the public access level does not stop modification.

  11. Question 11Single choiceTopic 6
    You need to recommend a solution for the App1 maintenance task. The solution must minimize costs.
    What should you include in the recommendation?
    1. A
      an Azure logic app
    2. B
      an Azure function
    3. C
      an Azure virtual machine
    4. D
      an App Service WebJob
    Show answer

    Correct answer: B

    Why

    A scheduled Azure Function in the Consumption plan runs the maintenance task on a timer trigger and is billed only per execution, so it is the cheapest option. A virtual machine runs continuously, a WebJob needs an always-on App Service plan, and a Logic App is less suited to running custom maintenance code.

  12. Question 12Single choiceTopic 7
    What should you include in the identity management strategy to support the planned changes?
    1. A
      Deploy domain controllers for corp.fabrikam.com to virtual networks in Azure.
    2. B
      Move all the domain controllers from corp.fabrikam.com to virtual networks in Azure.
    3. C
      Deploy a new Azure AD tenant for the authentication of new R&D projects.
    4. D
      Deploy domain controllers for the rd.fabrikam.com forest to virtual networks in Azure.
    Show answer

    Correct answer: A

    Why

    Deploying additional domain controllers for the existing corp.fabrikam.com domain to Azure virtual networks lets Azure-hosted workloads authenticate locally and keeps authentication available if on-premises connectivity fails. Moving all DCs removes on-premises resilience, and a new tenant or the rd.fabrikam.com forest does not meet the planned changes.

  13. Question 13Single choiceTopic 8
    You need to implement the Azure RBAC role assignments for the Network Contributor role. The solution must meet the authentication and authorization
    requirements.
    What is the minimum number of assignments that you must use?
    1. A
      1
    2. B
      2
    3. C
      5
    4. D
      10
    5. E
      15
    Show answer

    Correct answer: B

    Why

    Assigning Network Contributor to the required groups at the appropriate scopes (for example, once per resource group or subscription that contains the networking resources) means the minimum is two assignments rather than one per user or VNet. Assigning to groups instead of individual users keeps the count minimal.

  14. Question 14Single choiceTopic 9
    You need to recommend a solution to meet the database retention requirements.
    What should you recommend?
    1. A
      Configure a long-term retention policy for the database.
    2. B
      Configure Azure Site Recovery.
    3. C
      Use automatic Azure SQL Database backups.
    4. D
      Configure geo-replication of the database.
    Show answer

    Correct answer: A

    Why

    Azure SQL Database long-term retention (LTR) keeps weekly, monthly or yearly full backups for up to 10 years, meeting retention beyond the 1 to 35 days of automatic backups. Site Recovery is for VMs, and geo-replication provides availability, not historical backup retention.

  15. Question 15Single choiceTopic 10
    What should you recommend to meet the monitoring requirements for App2?
    1. A
      VM insights
    2. B
      Azure Application Insights
    3. C
      Microsoft Sentinel
    4. D
      Container insights
    Show answer

    Correct answer: B

    Why

    Azure Application Insights provides application performance monitoring for App2, including request rates, response times, dependencies, exceptions and availability tests. VM insights and Container insights monitor infrastructure, and Microsoft Sentinel is a SIEM for security analytics.