Ngân hàng đề — Microsoft Azure Developer

Tìm thấy 409 câu.

Câu 321 Chọn nhiều đáp án
Case study -

This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.

To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.

At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.


To start the case study -
To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. When you are ready to answer a question, click the Question button to return to the question.


Background -

VanArsdel, Ltd. is a global office supply company. The company is based in Canada and has retail store locations across the world. The company is developing several cloud-based solutions to support their stores, distributors, suppliers, and delivery services.


Current environment -


Corporate website -

The company provides a public website located at http://www.vanarsdelltd.com. The website consists of a React JavaScript user interface, HTML, CSS, image assets, and several APIs hosted in Azure Functions.


Retail Store Locations -

The company supports thousands of store locations globally. Store locations send data every hour to an Azure Blob storage account to support inventory, purchasing and delivery services. Each record includes a location identifier and sales transaction information.


Requirements -

The application components must meet the following requirements:


Corporate website -

•Secure the website by using SSL.
•Minimize costs for data storage and hosting.
•Implement native GitHub workflows for continuous integration and continuous deployment (CI/CD).
•Distribute the website content globally for local use.
•Implement monitoring by using Application Insights and availability web tests including SSL certificate validity and custom header value verification.
•The website must have 99.95 percent uptime.


Retail store locations -

•Azure Functions must process data immediately when data is uploaded to Blob storage. Azure Functions must update Azure Cosmos DB by using native SQL language queries.
•Audit store sale transaction information nightly to validate data, process sales financials, and reconcile inventory.


Delivery services -

•Store service telemetry data in Azure Cosmos DB by using an Azure Function. Data must include an item id, the delivery vehicle license plate, vehicle package capacity, and current vehicle location coordinates.
•Store delivery driver profile information in Azure Active Directory (Azure AD) by using an Azure Function called from the corporate website.


Inventory services -

The company has contracted a third-party to develop an API for inventory processing that requires access to a specific blob within the retail store storage account for three months to include read-only access to the data.


Security -

•All Azure Functions must centralize management and distribution of configuration data for different environments and geographies, encrypted by using a company-provided RSA-HSM key.
•Authentication and authorization must use Azure AD and services must use managed identities where possible.


Issues -


Retail Store Locations -

•You must perform a point-in-time restoration of the retail store location data due to an unexpected and accidental deletion of data.
•Azure Cosmos DB queries from the Azure Function exhibit high Request Unit (RU) usage and contain multiple, complex queries that exhibit high point read latency for large items as the function app is scaling.


You need to test the availability of the corporate website.

Which two test types can you use? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.
  1. A Standard
  2. B URL ping
  3. C Custom testing using the TrackAvailability API method
  4. D Multi-step
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi thuộc phần case study của kỳ thi chứng chỉ Azure (có lẽ là AZ-204 hoặc tương tự), mô tả tình huống thực tế về công ty VanArsdel, Ltd. – một doanh nghiệp cung cấp văn phòng phẩm toàn cầu sử dụng các dịch vụ Azure như Azure Functions, Blob Storage, Cosmos DB, Application Insights.

Bối cảnh chính liên quan đến câu hỏi:

  • Trang web công ty (corporate website) tại http://www.vanarsdelltd.com được xây dựng bằng React JS, HTML/CSS, và các API trên Azure Functions.
  • Yêu cầu giám sát (Requirements): Triển khai monitoring bằng Application Insights và availability web tests, bao gồm kiểm tra tính hợp lệ chứng chỉ SSL, xác thực giá trị custom header, với uptime 99.95%.
  • Câu hỏi cụ thể: "You need to test the availability of the corporate website. Which two test types can you use?" (Bạn cần kiểm tra tính sẵn sàng của trang web công ty. Loại kiểm tra nào có thể sử dụng? Mỗi lựa chọn đúng là một giải pháp hoàn chỉnh).

Mục tiêu là chọn hai loại test trong Application Insights Availability Tests để kiểm tra tính sẵn sàng (availability) của website từ nhiều vị trí địa lý, báo động nếu downtime. Các test này chạy định kỳ từ các điểm Azure toàn cầu (Azure endpoints), đo lường thời gian phản hồi, uptime, và hỗ trợ kiểm tra SSL/custom headers như yêu cầu.

📘 Tài liệu tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Hai đáp án đúng là:

  • Standard
  • Custom testing using the TrackAvailability API method

Lý do chọn:
🛠️ Những test này trực tiếp thuộc Availability Tests của Application Insights, phù hợp để kiểm tra availability của website công ty. Chúng hỗ trợ yêu cầu như kiểm tra SSL certificate validity và custom header verification (Standard test có tùy chọn này), chạy từ nhiều location toàn cầu, và tích hợp monitoring realtime với alerting/uptime calculation (99.95%). Custom test linh hoạt hơn bằng code từ app (TrackAvailability API), phù hợp với website React + Azure Functions. Các test khác không phải là "availability web tests" chuẩn.

📋 Giải thích chi tiết tất cả các phương án

Dưới đây là phân tích từng lựa chọn, giữ nguyên nội dung gốc tiếng Anh, chỉ giải thích bằng tiếng Việt:

  • Standard
    ✅ Đúng. Đây là loại availability web test cơ bản (URL ping test nâng cao) trong Application Insights. Test gửi HTTP/HTTPS request từ 10+ location Azure toàn cầu đến URL website, kiểm tra response time < 100s, uptime, SSL validity, và custom headers (như yêu cầu). Hỗ trợ tích hợp GitHub CI/CD và minimize costs (serverless). Phù hợp hoàn hảo cho corporate website.

  • URL ping
    ❌ Sai. Không phải loại test chính thức trong Application Insights Availability Tests. "URL ping" chỉ là khái niệm chung (như ICMP ping), không hỗ trợ kiểm tra SSL/custom headers hay multi-location testing như yêu cầu. Application Insights dùng "Standard" thay thế cho ping đơn giản, và nó không được liệt kê như một test type riêng biệt.

  • Custom testing using the TrackAvailability API method
    ✅ Đúng. Loại custom availability test cho phép code trong app (React JS hoặc Azure Functions) gọi TrackAvailability API để report availability metrics từ client-side hoặc server-side. Hỗ trợ kiểm tra chi tiết (SSL, headers), distribute globally, và integrate với Application Insights monitoring. Lý tưởng cho website động, giúp scale và tùy chỉnh theo requirements.

  • Multi-step
    ❌ Sai. Đây là multi-step web test trong Application Insights, dùng để test sequence các bước (ví dụ: login → search → checkout), không phải test availability đơn lẻ cho website. Nó tập trung vào end-to-end user journey chứ không phải uptime/SSL/global distribution như yêu cầu. Không phải giải pháp cho "test the availability".

Kết luận 🎯: Chọn Standard và Custom testing using the TrackAvailability API method để đáp ứng đầy đủ requirements monitoring cho website, đảm bảo 99.95% uptime với chi phí thấp và integration tốt.

Câu 322
You are developing several Azure API Management (APIM) hosted APIs.

The APIs have the following requirements:

•Require a subscription key to access all APIs.
•Include terms of use that subscribers must accept to use the APIs.
•Administrators must review and accept or reject subscription attempts.
•Limit the count of multiple simultaneous subscriptions.

You need to implement the APIs.

What should you do?
  1. A Configure and apply header-based versioning.
  2. B Create and publish a product.
  3. C Configure and apply query string-based versioning.
  4. D Add a new revision to all APIs. Make the revisions current and add a change log entry.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi này thuộc chủ đề Azure API Management (APIM), tập trung vào việc triển khai các API được host trên APIM với các yêu cầu cụ thể sau:

  • Yêu cầu subscription key: Tất cả API phải cần subscription key để truy cập (đây là cơ chế bảo mật cơ bản của APIM).
  • Terms of use: Người dùng phải chấp nhận điều khoản sử dụng trước khi sử dụng API.
  • Review subscriptions: Quản trị viên phải xem xét và chấp nhận/từ chối các yêu cầu đăng ký.
  • Limit multiple subscriptions: Giới hạn số lượng đăng ký đồng thời (ví dụ: quota hoặc policy để tránh lạm dụng).

Mục tiêu là chọn giải pháp phù hợp nhất để implement các API đáp ứng đầy đủ các yêu cầu trên. Đây là kiến thức cập nhật từ Azure API Management phiên bản mới nhất (tính đến 2026), nơi Products là tính năng cốt lõi để quản lý subscription, terms và approval workflow.

📘 Tài liệu tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Create and publish a product.
🛠️ Lý do: Trong Azure APIM, Product là đơn vị quản lý nhóm các API lại với nhau. Khi tạo và publish Product:

  • Tự động yêu cầu subscription key cho tất cả API trong Product.
  • Cho phép thêm terms of use (người dùng phải accept khi subscribe).
  • Hỗ trợ manual approval (quản trị viên review và accept/reject).
  • Có thể set quota/limits cho subscriptions (như max concurrent subs hoặc rate limits).
    Đây là cách triển khai chuẩn, hiệu quả nhất, phù hợp 100% với tất cả yêu cầu. Không cần code phức tạp, chỉ config qua portal hoặc ARM template.

📋 Giải thích tất cả các phương án

Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể:

  • ❌ Configure and apply header-based versioning.
    Phương án này chỉ liên quan đến versioning API qua header (như api-version trong header), dùng để quản lý các version khác nhau của API. Nó không xử lý subscription key, terms of use, approval hay limits. Chỉ phù hợp cho thay đổi API schema, không đáp ứng yêu cầu chính.

  • ✅ Create and publish a product.
    Như đã giải thích ở trên: Hoàn hảo cho tất cả yêu cầu (subscription, terms, approval, limits). Đây là best practice trong APIM.

  • ❌ Configure and apply query string-based versioning.
    Tương tự phương án đầu, đây là versioning qua query string (như ?api-version=2024-01). Chỉ dùng để phân biệt version API, không liên quan đến subscription management. Không giải quyết bất kỳ yêu cầu nào.

  • ❌ Add a new revision to all APIs. Make the revisions current and add a change log entry.
    Revisions trong APIM dùng để tạo bản sửa nhỏ (bug fix) mà không ảnh hưởng user hiện tại, kèm changelog. Nó không quản lý subscription, terms hay approval. Chỉ là tool deploy changes, không phù hợp cho yêu cầu tổng thể.

🧩 Tóm tắt: Các phương án versioning/revision chỉ là công cụ kỹ thuật nhỏ, trong khi Product là giải pháp toàn diện cho governance APIs trong APIM!

Câu 323 Chọn nhiều đáp án
You are developing an Azure Durable Function to manage an online ordering process.
The process must call an external API to gather product discount information.
You need to implement the Azure Durable Function.
Which Azure Durable Function types should you use? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
  1. A Orchestrator
  2. B Entity
  3. C Client
  4. D Activity
Xem giải thích

🧩 Phân tích chi tiết câu hỏi

Câu hỏi gốc:
You are developing an Azure Durable Function to manage an online ordering process. The process must call an external API to gather product discount information. You need to implement the Azure Durable Function. Which Azure Durable Function types should you use? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

✅ Giải thích nội dung câu hỏi:
Câu hỏi này tập trung vào việc phát triển một Azure Durable Function để quản lý quy trình đặt hàng trực tuyến (online ordering process). Yêu cầu chính là quy trình phải gọi một external API bên ngoài để lấy thông tin giảm giá sản phẩm (product discount information). Chúng ta cần chọn các loại Azure Durable Function phù hợp để triển khai (implement) chức năng này. Đây là câu hỏi trắc nghiệm đa lựa chọn (multiple correct answers), mỗi đáp án đúng chiếm 1 điểm.

Azure Durable Functions là một phần mở rộng của Azure Functions, cho phép xây dựng các ứng dụng stateful (có trạng thái) với orchestration (điều phối workflow) đáng tin cậy, hỗ trợ retry, timeout và parallelism. Quy trình đặt hàng cần:

  • Điều phối logic chính (orchestrate các bước như kiểm tra đơn hàng, gọi API giảm giá, cập nhật trạng thái).
  • Thực thi công việc thực tế (gọi external API mà không làm gián đoạn tính deterministic của orchestrator).
    Phiên bản mới nhất (cập nhật đến 2026): Azure Durable Functions v2.x vẫn giữ nguyên các loại function cơ bản này, với cải tiến về performance và integration với .NET 8+, JavaScript/TypeScript, Python (xem tài liệu chính thức).

📘 Tài liệu tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Orchestrator và Activity.

🛠️ Lý do chi tiết:

  • Để triển khai quy trình đặt hàng, cần Orchestrator làm trung tâm điều phối toàn bộ workflow (ví dụ: gọi activity lấy discount, chờ timer, xử lý parallel orders).
  • Activity chịu trách nhiệm thực hiện các tác vụ không deterministic như gọi external API (vì Orchestrator phải deterministic để replay state đúng cách).
    Kết hợp cả hai tạo nên một Durable Function hoàn chỉnh cho process này, đảm bảo reliability và scalability.

📋 Giải thích tất cả các phương án

Dưới đây là phân tích từng lựa chọn một cách chi tiết:

  • Orchestrator
    ✅ Đúng: Orchestrator function là "bộ não" của Durable Functions, chịu trách nhiệm điều phối quy trình (orchestration) như gọi activities, xử lý timers, events và human interactions. Trong trường hợp này, nó sẽ orchestrate việc gọi external API qua Activity, đảm bảo workflow đặt hàng diễn ra mượt mà mà không bị gián đoạn. Không dùng Orchestrator thì không thể xây dựng durable workflow.

  • Entity
    ❌ Sai: Entity function dùng để quản lý stateful entities (như counter, actor model) với các operation như signal hoặc query state. Quy trình đặt hàng chỉ cần workflow đơn giản gọi API, không yêu cầu lưu trữ state phức tạp kiểu actor-based, nên Entity không cần thiết và không phải phần của solution này.

  • Client
    ❌ Sai: Client function chỉ dùng để khởi tạo (start) orchestration từ bên ngoài (như HTTP trigger). Nó không tham gia trực tiếp vào implementation của quy trình nội bộ (manage the process), mà chỉ là "cửa ngõ" trigger. Câu hỏi tập trung vào việc implement process chính, không phải khởi tạo.

  • Activity
    ✅ Đúng: Activity function thực hiện công việc thực tế (side effects) như gọi external API, I/O operations, hoặc xử lý business logic. External API call phải đặt trong Activity để tránh làm Orchestrator non-deterministic (dễ lỗi replay state). Đây là phần cốt lõi để lấy product discount info.

🧩 Kết luận: Solution hoàn chỉnh là Orchestrator + Activity, phù hợp với pattern "Fan-out/Fan-in" hoặc "Async HTTP API" trong Durable Functions. Nếu triển khai, code mẫu sẽ có Orchestrator gọi await context.CallActivityAsync("GetDiscount", productId);.

Câu 324 Chọn nhiều đáp án
You are developing an inventory tracking solution. The solution includes an Azure Function app containing multiple functions triggered by Azure Cosmos DB. You plan to deploy the solution to multiple Azure regions.

The solution must meet the following requirements:

•Item results from Azure Cosmos DS must return the most recent committed version of an item.
•Items written to Azure Cosmos DB must provide ordering guarantees.

You need to configure the consistency level for the Azure Cosmos DB deployments.

Which consistency level should you use?
  1. A consistent prefix
  2. B eventual
  3. C bounded staleness
  4. D strong
  5. E session
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi xoay quanh việc phát triển một giải pháp theo dõi hàng tồn kho (inventory tracking solution) sử dụng Azure Function app với nhiều function được kích hoạt bởi Azure Cosmos DB. Giải pháp cần triển khai trên nhiều vùng Azure (multi-region).

Các yêu cầu chính cần đáp ứng:

  • Kết quả item từ Azure Cosmos DB phải trả về phiên bản mới nhất đã commit (most recent committed version): Nghĩa là mọi lần đọc dữ liệu phải đảm bảo lấy được dữ liệu mới nhất, đã được commit chắc chắn trên tất cả các replica.
  • Item được ghi vào Azure Cosmos DB phải có đảm bảo thứ tự (ordering guarantees): Các bản ghi (writes) phải được sắp xếp theo thứ tự thời gian chính xác, tránh tình trạng rối loạn thứ tự giữa các vùng (ví dụ: monotonic reads/writes, consistent prefix).

Nhiệm vụ là chọn consistency level phù hợp cho các deployment Azure Cosmos DB để đáp ứng cả hai yêu cầu trên, đặc biệt trong môi trường multi-region. 🛠️ Consistency level là cơ chế kiểm soát độ nhất quán dữ liệu giữa các replica trong Cosmos DB, cân bằng giữa hiệu suất, độ trễ và tính chính xác.

📘 Tài liệu tham khảo chính (cập nhật đến năm 2026 theo Azure Docs):

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: "bounded staleness" và "strong".
🧩 Lý do chi tiết:

  • Cả hai mức độ nhất quán này đều cung cấp ordering guarantees đầy đủ (monotonic document read, monotonic document write, read-your-writes consistency, và consistent prefix reads), phù hợp với yêu cầu thứ tự ghi ở multi-region.
  • Strong: Đảm bảo luôn trả về most recent committed version (linearizability), đọc dữ liệu mới nhất trên tất cả replica, dù có overhead cao hơn ở multi-region.
  • Bounded Staleness: Giới hạn độ cũ (staleness) trong khoảng thời gian/K reads cố định (mặc định 5 phút hoặc 100k RU), vẫn đảm bảo ordering guarantees mạnh mẽ và gần với most recent version nhất có thể, phù hợp hiệu suất tốt hơn cho multi-region writes.
  • Các mức khác không đáp ứng đầy đủ cả hai yêu cầu (chi tiết bên dưới). Đây là lựa chọn tối ưu theo best practices Azure cho workload yêu cầu ordering + gần real-time consistency.

📋 Giải thích tất cả các phương án

Dưới đây là phân tích từng lựa chọn một cách chi tiết. Tôi giữ nguyên văn bản gốc bằng tiếng Anh, chỉ giải thích bằng tiếng Việt với đánh giá đúng/sai dựa trên yêu cầu câu hỏi:

  • ❌ consistent prefix
    ❌ Sai: Mức này chỉ đảm bảo consistent prefix reads (đọc theo prefix thứ tự), nhưng không đảm bảo most recent committed version (có thể đọc dữ liệu cũ hơn). Ordering guarantees chỉ ở mức prefix, không đầy đủ monotonic cho writes ở multi-region. Không phù hợp yêu cầu "most recent" và ordering mạnh.

  • ❌ eventual
    ❌ Sai: Đây là mức yếu nhất, không có ordering guarantees (có thể đọc writes không theo thứ tự). Dữ liệu cuối cùng sẽ nhất quán nhưng không đảm bảo most recent version kịp thời. Phù hợp high availability nhưng vi phạm cả hai yêu cầu chính.

  • ✅ bounded staleness
    ✅ Đúng: Cung cấp ordering guarantees đầy đủ (monotonic reads/writes), và đọc dữ liệu với độ cũ giới hạn (bounded), gần với most recent committed version nhất có thể (trong 5 phút/100k reads). Lý tưởng cho multi-region với trade-off tốt giữa consistency và performance.

  • ✅ strong
    ✅ Đúng: Mức mạnh nhất, luôn trả về most recent committed version (linearizability trên tất cả replica) và ordering guarantees tuyệt đối. Hoàn hảo cho yêu cầu, dù có latency cao hơn ở multi-region (vẫn hỗ trợ theo docs Azure).

  • ❌ session
    ❌ Sai: Chỉ đảm bảo consistency trong một session/client duy nhất (per-partition/session), không global ordering guarantees ở multi-region hoặc giữa các client khác. Không đảm bảo most recent version toàn cục, chỉ phù hợp single-client scenarios.

Câu 325
You manage a data processing application that receives requests from an Azure Storage queue.
You need to manage access to the queue. You have the following requirements:
✑ Provide other applications access to the Azure queue.
✑ Ensure that you can revoke access to the queue without having to regenerate the storage account keys.
✑ Specify access at the queue level and not at the storage account level.
Which type of shared access signature (SAS) should you use?
  1. A Service SAS with a stored access policy
  2. B Account SAS
  3. C User Delegation SAS
  4. D Service SAS with ad hoc SAS
Xem giải thích

🧩 Phân tích chi tiết câu hỏi

Câu hỏi này xoay quanh việc quản lý quyền truy cập (access) vào một hàng đợi (queue) trong Azure Storage, cụ thể là ứng dụng xử lý dữ liệu nhận yêu cầu từ Azure Storage queue. Các yêu cầu chính bao gồm:

  • ✅ Cung cấp quyền truy cập cho các ứng dụng khác vào queue cụ thể.
  • ✅ Thu hồi quyền truy cập (revoke) mà không cần tạo lại khóa tài khoản lưu trữ (storage account keys) – điều này rất quan trọng để tránh gián đoạn toàn bộ tài khoản.
  • ✅ Chỉ định quyền truy cập ở mức queue (queue level), không phải ở mức tài khoản lưu trữ (storage account level), nhằm kiểm soát chi tiết hơn.

Câu hỏi yêu cầu chọn loại Shared Access Signature (SAS) phù hợp nhất. SAS là cơ chế cấp quyền tạm thời, an toàn cho tài nguyên Azure Storage mà không chia sẻ khóa tài khoản chính. (Kiến thức cập nhật đến 2026: Azure Storage hỗ trợ các loại SAS theo tài liệu chính thức mới nhất, với cải tiến về bảo mật như hỗ trợ Entra ID tích hợp sâu hơn).

📘 Tài liệu tham khảo:

✅ Đáp án đúng: Service SAS with a stored access policy

Lý do chọn đáp án này:
🛠️ Service SAS cho phép kiểm soát quyền truy cập ở mức service cụ thể (như queue) và tài nguyên con (queue level), không ảnh hưởng toàn bộ tài khoản.
🛠️ Stored access policy là "chính sách truy cập được lưu trữ" định nghĩa trước trên queue (permissions, thời hạn, IP,...). SAS chỉ tham chiếu (reference) policy này qua ID. Để thu hồi, chỉ cần xóa hoặc chỉnh sửa policy trên queue – SAS tự động vô hiệu hóa mà không cần tạo lại khóa tài khoản hay phát hành SAS mới. Điều này hoàn hảo khớp 3 yêu cầu: access cho app khác, revoke dễ dàng, queue-level.

📋 Giải thích tất cả các phương án

  • ✅ [ĐÚNG] Service SAS with a stored access policy
    Như đã giải thích ở trên, đây là lựa chọn lý tưởng vì hỗ trợ queue-level control, revoke linh hoạt qua policy mà không động đến account keys. Hoàn toàn phù hợp với yêu cầu.

  • ❌ [SAI] Account SAS
    Account SAS cấp quyền ở mức toàn bộ storage account, ảnh hưởng tất cả services (queues, blobs, tables,...). Không đáp ứng yêu cầu queue-level và revoke khó khăn vì phải tạo lại SAS mới, có thể liên quan gián tiếp đến account keys.

  • ❌ [SAI] User Delegation SAS
    User Delegation SAS dựa trên Entra ID (Azure AD) để ủy quyền, chủ yếu dành cho Blobs và Files (không hỗ trợ Queues theo tài liệu 2026). Không thể dùng cho queue và không đảm bảo queue-level revoke mà không regenerate.

  • ❌ [SAI] Service SAS with ad hoc SAS
    Service SAS hỗ trợ queue-level tốt, nhưng ad hoc SAS là SAS "tạm thời" (không dùng stored policy), tự chứa permissions/thời hạn. Để revoke, phải tạo SAS mới và phân phối lại, không linh hoạt và có thể gián tiếp yêu cầu quản lý keys nếu cần thiết. Không khớp yêu cầu revoke dễ dàng.

Câu 326
You have an Azure API Management (APIM) Standard tier instance named APIM1 that uses a managed gateway.

You plan to use APIM1 to publish an API named API1 that uses a backend database that supports only a limited volume of requests per minute. You also need a policy for API1 that will minimize the possibility that the number of requests to the backend database from an individual IP address you specify exceeds the supported limit.

You need to identify a policy for API1 that will meet the requirements.

Which policy should you use?
  1. A ip-filter
  2. B quota-by-key
  3. C rate-limit-by-key
  4. D rate-limit
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi xoay quanh Azure API Management (APIM) ở tier Standard với instance tên APIM1 sử dụng managed gateway. Bạn cần publish một API tên API1 có backend là database chỉ hỗ trợ giới hạn số lượng request mỗi phút (limited volume of requests per minute).

Yêu cầu chính: Áp dụng policy cho API1 để giảm thiểu tối đa khả năng số request từ một địa chỉ IP cụ thể vượt quá giới hạn hỗ trợ của backend database.

Tức là, cần policy giới hạn tốc độ request (rate limiting) dựa trên IP address cá nhân, phù hợp với hạn chế "per minute" của backend. Đây là tình huống phổ biến trong APIM để bảo vệ backend khỏi overload từ một nguồn cụ thể. 📘 (Dựa trên tài liệu Azure APIM policies mới nhất 2024-2026, không thay đổi lớn ở Standard tier).

✅ Đáp án đúng: rate-limit-by-key

Lý do lựa chọn:

  • Policy rate-limit-by-key cho phép giới hạn số request theo key cụ thể (có thể đặt key là {{client.ip}} để theo dõi theo IP address) trong một khoảng thời gian ngắn như 1 phút (hoặc tùy chỉnh).
  • Điều này trực tiếp minimize khả năng vượt giới hạn per minute từ IP cá nhân, khớp hoàn hảo với yêu cầu bảo vệ backend database có hạn chế volume requests/phút.
  • Trong APIM Standard tier với managed gateway, policy này được hỗ trợ đầy đủ và hiệu quả cho rate limiting granular. 🛠️

Nguồn tham khảo:

❌ Giải thích tất cả các phương án

  • ip-filter:
    ❌ Sai vì policy này chỉ lọc/chặn IP cụ thể (allow/deny list), không giới hạn số lượng request theo thời gian (như per minute). Nó không xử lý "limited volume" mà chỉ block hoàn toàn, không phù hợp với yêu cầu minimize exceed limit từ IP được chỉ định.

  • quota-by-key:
    ❌ Sai vì policy này giới hạn tổng số request theo key trong khoảng thời gian dài (như ngày/tháng, ví dụ 1000 calls/day), không tập trung vào rate per minute ngắn hạn. Không hiệu quả để bảo vệ backend có giới hạn "per minute" từ IP cá nhân.

  • rate-limit-by-key:
    ✅ Đúng (như đã giải thích ở trên). Đây là policy lý tưởng cho rate limiting theo key (IP) với renewal-period ngắn (per minute), trực tiếp ngăn chặn burst requests từ một IP.

  • rate-limit:
    ❌ Sai vì policy này áp dụng rate limiting chung cho tất cả requests (không theo key cụ thể như IP), dẫn đến giới hạn toàn bộ API thay vì chỉ per IP cá nhân. Không đáp ứng yêu cầu "from an individual IP address you specify".

Kết luận: Chọn rate-limit-by-key với cấu hình key={{client.ip}} và renewal-period="60s" là giải pháp tối ưu! 🚀

Câu 327
You develop a web application that sells access to last-minute openings for child camps that run on the weekends. The application uses Azure Application Insights for all alerting and monitoring.

The application must alert operators when a technical issue is preventing sales to camps.

You need to build an alert to detect technical issues.

Which alert type should you use?
  1. A Metric alert using multiple time series
  2. B Metric alert using dynamic thresholds
  3. C Log alert using multiple time series
  4. D Log alert using dynamic thresholds
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi mô tả một ứng dụng web bán vé truy cập vào các trại trẻ em cuối tuần (child camps) với lịch trình cuối tuần. Ứng dụng sử dụng Azure Application Insights để xử lý toàn bộ việc alerting và monitoring.
Yêu cầu chính: Xây dựng một alert để phát hiện technical issues (vấn đề kỹ thuật) đang ngăn chặn việc bán hàng cho các camp (preventing sales to camps).
📌 Mục tiêu: Alert phải nhạy cảm với các vấn đề bất thường, chẳng hạn như lỗi server, giảm availability, hoặc failure rate cao, đặc biệt trong ngữ cảnh bán hàng thời gian thực (last-minute openings). Application Insights hỗ trợ hai loại alert chính: Metric alerts (dựa trên metrics số liệu) và Log alerts (dựa trên logs/queries). Loại alert phù hợp cần tự động detect anomalies mà không cần ngưỡng cố định, vì traffic bán hàng có thể biến động theo cuối tuần.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Metric alert using dynamic thresholds

Lý do:
🛠️ Trong Azure Application Insights (phiên bản mới nhất 2024-2026), Metric alerts với dynamic thresholds là lựa chọn tối ưu để detect technical issues như giảm performance hoặc failure rate bất thường. Nó sử dụng machine learning để tự động tính toán ngưỡng dựa trên dữ liệu lịch sử (historical patterns), giúp phát hiện anomalies chính xác mà không cần cấu hình thủ công. Điều này rất phù hợp cho ứng dụng bán hàng có traffic biến động (ví dụ: cao điểm cuối tuần), tránh false positives/negatives.
📘 Nguồn tham khảo:

📋 Giải thích tất cả các phương án

Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá ✅ (đúng) hoặc ❌ (sai), kèm lý do bằng tiếng Việt:

  • Metric alert using multiple time series ❌
    Sai vì: Phương án này chỉ hỗ trợ phân tích nhiều time series (dữ liệu chuỗi thời gian đa chiều, như theo dimension location/user), nhưng không tự động detect anomalies linh hoạt. Nó yêu cầu ngưỡng tĩnh (static thresholds), kém hiệu quả cho technical issues biến động như preventing sales, dễ miss anomalies trong traffic cao điểm cuối tuần. Không phải lựa chọn tối ưu cho anomaly detection.

  • Metric alert using dynamic thresholds ✅
    Đúng vì: Như đã giải thích ở trên, đây là loại alert lý tưởng cho Application Insights metrics (ví dụ: availability, failed transactions). Dynamic thresholds dùng ML để điều chỉnh ngưỡng tự động (±2-10 độ lệch chuẩn từ baseline), phát hiện chính xác technical issues ngăn bán hàng mà không cần can thiệp thủ công. Hoàn hảo cho web app thời gian thực.

  • Log alert using multiple time series ❌
    Sai vì: Log alerts dùng cho Kusto Query Language (KQL) queries trên logs, không hỗ trợ "multiple time series" một cách tự nhiên như metrics. Nó phù hợp cho custom log analysis (ví dụ: trace errors cụ thể), nhưng kém hiệu quả cho real-time technical issues số liệu (như sales failures), tốn tài nguyên query và không có ML anomaly detection mạnh mẽ.

  • Log alert using dynamic thresholds ❌
    Sai vì: Mặc dù Log alerts trong Azure Monitor (từ 2023+) hỗ trợ dynamic thresholds cho một số queries, nhưng chúng không được khuyến nghị cho Application Insights alerting chính (ưu tiên metrics cho performance/sales metrics). Log alerts chậm hơn, phức tạp hơn cho queries lớn, và ít chính xác cho detecting broad technical issues như preventing sales so với metric-based dynamic thresholds.

🧠 Lưu ý bổ sung: Theo best practices Azure 2026, ưu tiên metric alerts cho telemetry tiêu chuẩn từ App Insights (như dependencies failed, requests failed). Nếu cần custom logic sâu, mới dùng log alerts. Test alert bằng Alert rules trong Azure Portal để verify!

Câu 328
You develop Azure Durable Functions to manage vehicle loans.

The loan process includes multiple actions that must be run in a specified order. One of the actions includes a customer credit check process, which may require multiple days to process.

You need to implement Azure Durable Functions for the loan process.

Which Azure Durable Functions type should you use?
  1. A orchestrator
  2. B client
  3. C entity
  4. D activity
Xem giải thích

🧩 Phân tích chi tiết câu hỏi trắc nghiệm về Azure Durable Functions

📖 Nội dung câu hỏi được giải thích rõ ràng:
Câu hỏi mô tả một kịch bản phát triển Azure Durable Functions để quản lý quy trình vay vốn mua xe (vehicle loans). Quy trình này bao gồm nhiều hành động (actions) phải được thực hiện theo thứ tự cụ thể (specified order). Đặc biệt, một hành động quan trọng là kiểm tra tín dụng khách hàng (customer credit check) có thể mất nhiều ngày để hoàn tất. Nhiệm vụ là chọn loại Azure Durable Functions phù hợp để triển khai quy trình này.

Azure Durable Functions là một phần mở rộng của Azure Functions, cho phép xây dựng các ứng dụng durable (bền vững), hỗ trợ orchestration (điều phối) các hàm theo luồng công việc phức tạp, xử lý trạng thái lâu dài (stateful workflows), và chịu được lỗi mà không mất dữ liệu. Điều này lý tưởng cho quy trình như vay vốn, nơi cần chờ đợi asynchronous (như kiểm tra tín dụng kéo dài).

✅ Đáp án đúng: orchestrator
Lý do lựa chọn:
Orchestrator function chính là "bộ não" điều phối toàn bộ quy trình. Nó định nghĩa luồng thực thi theo thứ tự (sequence), gọi các activity functions khác, và hỗ trợ chờ đợi lâu dài (durable timers/human interaction) mà không timeout như functions thông thường. Trong trường hợp kiểm tra tín dụng mất nhiều ngày, orchestrator có thể pause/resume orchestration một cách tự động, lưu trạng thái vào Azure Storage. Đây là lựa chọn chuẩn theo tài liệu Microsoft mới nhất (cập nhật 2024-2026, không thay đổi lớn ở phiên bản runtime v4+).

🛠️ Giải thích tất cả các phương án (đúng/sai):

  • orchestrator ✅ Đúng: Như đã giải thích, đây là loại function chuyên điều phối (orchestrate) các activity theo thứ tự logic, hỗ trợ chờ đợi dài hạn (external events, timers). Phù hợp hoàn hảo cho quy trình vay vốn với các bước tuần tự và chờ tín dụng. Không dùng orchestrator sẽ không thể quản lý state bền vững.
  • client ❌ Sai: Client function chỉ dùng để khởi tạo (initiate) một orchestration instance (gọi orchestrator). Nó không điều phối quy trình mà chỉ là "cửa ngõ" từ bên ngoài (HTTP trigger). Không thể xử lý thứ tự actions hay chờ đợi nhiều ngày.
  • entity ❌ Sai: Entity function dùng để quản lý state chia sẻ (như actor model), lưu trữ và cập nhật dữ liệu bền vững giữa các hàm. Không phù hợp cho orchestration luồng công việc tuần tự; nó chỉ là "kho dữ liệu" hỗ trợ, không phải điều phối chính.
  • activity ❌ Sai: Activity function là đơn vị công việc thực thi (như gọi API kiểm tra tín dụng). Nó không điều phối gì cả, chỉ được gọi BỞI orchestrator. Nếu dùng riêng lẻ, không thể đảm bảo thứ tự hay state lâu dài.

📘 Tài liệu tham khảo (cập nhật mới nhất đến 2026):

Hy vọng phân tích này giúp bạn nắm vững Azure Durable Functions! 🚀 Nếu cần code mẫu, hãy hỏi thêm nhé!

Câu 329
You are building a web application that uses the Microsoft identity platform for user authentication.
You are implementing user identification for the web application.
You need to retrieve a claim to uniquely identify a user.
Which claim type should you use?
  1. A aud
  2. B nonce
  3. C oid
  4. D idp
Xem giải thích

🧩 Phân tích chi tiết câu hỏi

Câu hỏi gốc:
You are building a web application that uses the Microsoft identity platform for user authentication.
You are implementing user identification for the web application.
You need to retrieve a claim to uniquely identify a user.
Which claim type should you use?

✅ Giải thích nội dung câu hỏi:
Câu hỏi tập trung vào việc phát triển một ứng dụng web sử dụng Microsoft identity platform (nay là Microsoft Entra ID, trước đây là Azure AD) để xác thực người dùng (authentication). Khi triển khai nhận dạng người dùng (user identification), bạn cần lấy một claim (thông tin khẳng định) từ ID token để xác định duy nhất (uniquely identify) người dùng. Đây là tình huống phổ biến trong OAuth 2.0/OpenID Connect, nơi ID token chứa các claims như ID người dùng, quyền hạn, v.v. Kiến thức dựa trên phiên bản mới nhất của Microsoft Entra ID đến năm 2026, với các claims chuẩn trong ID token không thay đổi cơ bản so với các bản cập nhật trước (tham khảo OpenID Connect Core 1.0 và Microsoft docs).

🛠️ Đáp án đúng: oid
Lý do lựa chọn: Claim oid (Object ID) là định danh duy nhất toàn cục của người dùng trong Microsoft Entra ID. Nó được sử dụng để nhận dạng chính xác user qua các ứng dụng và tenant khác nhau, không thay đổi ngay cả khi user thay đổi tên hoặc email. Đây là claim chuẩn và được khuyến nghị cho user identification trong ID token. ✅

📘 Giải thích tất cả các phương án (dựa trên Microsoft Entra ID ID Token claims)

  • aud ❌
    Sai vì: Claim aud (Audience) chỉ định đối tượng nhận token (thường là Application ID của app bạn). Nó không liên quan đến việc xác định người dùng mà dùng để kiểm tra token có hợp lệ cho app cụ thể không. Sử dụng sai sẽ không uniquely identify user.

  • nonce ❌
    Sai vì: Claim nonce là giá trị ngẫu nhiên chống replay attack (tấn công phát lại). Nó được client gửi trong request và server echo lại để xác minh tính toàn vẹn, không phải để identify user.

  • oid ✅
    Đúng vì: Như đã giải thích ở trên, oid là Object Identifier – ID duy nhất, immutable của user trong Entra ID directory. Lý tưởng cho user identification, đặc biệt trong multi-tenant apps. (Ví dụ: GUID như "12345678-1234-1234-1234-123456789abc").

  • idp ❌
    Sai vì: Claim idp (Identity Provider) chỉ định nhà cung cấp định danh đã xác thực user (ví dụ: "https://sts.windows.net/{tenant-id}/"). Nó dùng để biết nguồn xác thực (như Entra ID hay external IdP), không uniquely identify user.

📚 Tài liệu tham khảo (cập nhật đến 2026)

Hy vọng phân tích này giúp bạn nắm vững! 🚀

Câu 330
Case study -

This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.

To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.

At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.


To start the case study -
To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. When you are ready to answer a question, click the Question button to return to the question.


Background -

Munson’s Pickles and Preserves Farm is an agricultural cooperative corporation based in Washington, US, with farms located across the United States. The company supports agricultural production resources by distributing seeds fertilizers, chemicals, fuel, and farm machinery to the farms.


Current Environment -

The company is migrating all applications from an on-premises datacenter to Microsoft Azure. Applications support distributors, farmers, and internal company staff.


Corporate website -
•The company hosts a public website located at http://www.munsonspicklesandpreservesfarm.com. The site supports farmers and distributors who request agricultural production resources.


Farms -
•The company created a new customer tenant in the Microsoft Entra admin center to support authentication and authorization for applications.


Distributors -
•Distributors integrate their applications with data that is accessible by using APIs hosted at http://www.munsonspicklesandpreservesfarm.com/api to receive and update resource data.


Requirements -

The application components must meet the following requirements:


Corporate website -
•The site must be migrated to Azure App Service.
•Costs must be minimized when hosting in Azure.
•Applications must automatically scale independent of the compute resources.
•All code changes must be validated by internal staff before release to production.
•File transfer speeds must improve, and webpage-load performance must increase.
•All site settings must be centrally stored, secured without using secrets, and encrypted at rest and in transit.
•A queue-based load leveling pattern must be implemented by using Azure Service Bus queues to support high volumes of website agricultural production resource requests.


Farms -
•Farmers must authenticate to applications by using Microsoft Entra ID.


Distributors -
•The company must track a custom telemetry value with each API call and monitor performance of all APIs.
•API telemetry values must be charted to evaluate variations and trends for resource data.


Internal staff -
•App and API updates must be validated before release to production.
•Staff must be able to select a link to direct them back to the production app when validating an app or API update.
•Staff profile photos and email must be displayed on the website once they authenticate to applications by using their Microsoft Entra ID.


Security -
•All web communications must be secured by using TLS/HTTPS.
•Web content must be restricted by country/region to support corporate compliance standards.
•The principle of least privilege must be applied when providing any user rights or process access rights.
•Managed identities for Azure resources must be used to authenticate services that support Microsoft Entra ID authentication.


Issues -


Corporate website -
•Farmers report HTTP 503 errors at the same time as internal staff report that CPU and memory usage are high.
•Distributors report HTTP 502 errors at the same time as internal staff report that average response times and networking traffic are high.
•Internal staff report webpage load sizes are large and take a long time to load.
•Developers receive authentication errors to Service Bus when they debug locally.


Distributors -
•Many API telemetry values are sent in a short period of time. Telemetry traffic, data costs, and storage costs must be reduced while preserving a statistically correct analysis of the data points sent by the APIs.


You need to implement an aggregate of telemetry values for distributor API calls.

Which Application Insights API method should you use?
  1. A TrackEvent
  2. B TrackDependency
  3. C TrackMetric
  4. D TrackException
  5. E TrackTrace
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi thuộc phần case study về công ty Munson’s Pickles and Preserves Farm, đang di chuyển ứng dụng từ on-premises sang Microsoft Azure. Phần liên quan đến Distributors (nhà phân phối): Họ tích hợp ứng dụng với API tại http://www.munsonspicklesandpreservesfarm.com/api để nhận và cập nhật dữ liệu tài nguyên nông nghiệp.

Vấn đề cụ thể (Issues - Distributors):

  • Nhiều giá trị telemetry tùy chỉnh (custom telemetry values) được gửi trong thời gian ngắn, dẫn đến lưu lượng telemetry cao, chi phí dữ liệu và lưu trữ tăng.
  • Yêu cầu: Giảm telemetry traffic, data costs, storage costs, nhưng vẫn giữ phân tích thống kê chính xác (statistically correct analysis) của các điểm dữ liệu từ API.

Nhiệm vụ: Triển khai aggregate (tổng hợp) các giá trị telemetry cho các cuộc gọi API của nhà phân phối. Câu hỏi yêu cầu chọn Application Insights API method phù hợp từ SDK của Azure Application Insights (thuộc Azure Monitor) để track telemetry mà hỗ trợ aggregation tự động, giúp giảm dữ liệu thô và chi phí.

Bối cảnh Azure: Application Insights hỗ trợ theo dõi metrics/events để monitor API performance, với yêu cầu track custom telemetry và chart để đánh giá variations/trends.

✅ Đáp án đúng: TrackMetric

Lý do lựa chọn:

  • TrackMetric được thiết kế chuyên biệt để gửi metrics tùy chỉnh (custom metrics), hỗ trợ aggregation tự động (như average, sum, min/max, count) tại server-side của Application Insights.
  • Điều này giảm traffic và chi phí vì chỉ gửi giá trị metric thô, không gửi toàn bộ dữ liệu chi tiết mỗi lần – hệ thống sẽ tổng hợp trước khi lưu trữ/phân tích.
  • Phù hợp hoàn hảo với yêu cầu aggregate telemetry values, giảm data volume trong thời gian ngắn (burst traffic), nhưng vẫn đảm bảo statistically correct analysis qua các aggregation types (ví dụ: sum cho total values, avg cho trends).
  • Trong case study, cần chart telemetry values để evaluate variations/trends → Metrics trong App Insights hỗ trợ visualization tốt qua Metrics Explorer.
  • Cập nhật 2026: Theo docs Azure Monitor (v2.x SDK), TrackMetric vẫn là phương pháp khuyến nghị cho custom metrics với aggregation, hỗ trợ dynamic sampling và cost optimization (Azure Monitor pricing model ưu tiên metrics aggregated).

📘 Tài liệu tham khảo:

🛠️ Giải thích tất cả các phương án (Đúng/Sai)

  • ❌ TrackEvent:

    • Phương án này dùng để track custom events (sự kiện tùy chỉnh) như user actions (ví dụ: button click). Mỗi event gửi dữ liệu riêng lẻ, không hỗ trợ aggregation tự động, dẫn đến traffic cao nếu gửi nhiều lần → Không giảm costs, không phù hợp aggregate telemetry.
  • ❌ TrackDependency:

    • Dùng để track dependencies (phụ thuộc bên ngoài) như calls đến DB, HTTP external, Redis. Nó tự động detect và aggregate một số metrics, nhưng chỉ cho dependencies, không dành cho custom telemetry API values → Không match yêu cầu custom aggregate.
  • ✅ TrackMetric:

    • (Như giải thích trên) Phù hợp nhất: Hỗ trợ aggregate custom telemetry (ví dụ: TrackMetric("ApiResourceCount", value, average=AggregationType.Average)), giảm volume dữ liệu 90%+ so với events/traces, giữ analysis chính xác qua server-side math.
  • ❌ TrackException:

    • Chỉ dùng để track exceptions/lỗi (với stack trace). Không liên quan đến telemetry values thông thường, không aggregate metrics → Sẽ tăng noise và costs vô ích.
  • ❌ TrackTrace:

    • Dùng cho diagnostic traces/logs (diagnostic messages). Gửi text-based data, không aggregate numerical values, dẫn đến storage cao nếu burst traffic → Không giảm costs, kém hiệu quả cho charting trends.

💡 Lưu ý chung: Chọn TrackMetric tuân thủ principle of least privilege (security req) vì metrics ít nhạy cảm hơn traces. Implement ví dụ: telemetryClient.TrackMetric("CustomApiTelemetry", aggregatedValue); với aggregation type phù hợp.