Tüm alıştırma soruları

972 soru

Soru 1Soru

You are developing a document approval workflow using Azure Durable Functions in C# (.NET Isolated). The workflow must wait for an external approval event named `DocumentApproved` for up to 2424 hours. If the event is received within 2424 hours, the document is processed. If the 2424-hour limit is reached without receiving the event, the document must be marked as expired. You write the following orchestrator function code:

csharp
[Function("ApprovalOrchestrator")]
public static async Task Run(
[OrchestrationTrigger] TaskOrchestrationContext context)
{
var approvalTask = context.WaitForExternalEvent<bool>("DocumentApproved");
var timeoutTask = Task.Delay(TimeSpan.FromHours(24));

var completedTask = await Task.WhenAny(approvalTask, timeoutTask);
if (completedTask == approvalTask)
{
bool isApproved = approvalTask.Result;
await context.CallActivityAsync("ProcessDocument", isApproved);
}
else
{
await context.CallActivityAsync("ExpireDocument", null);
}
}

Which of the following describes the defect in this orchestrator code?

Cevabı ve açıklamayı göster

Cevap: The use of `Task.Delay` violates the determinism constraint of orchestrator functions; you should use `context.CreateTimer` instead.

Cevap

The use of Task.Delay violates the determinism constraint of orchestrator functions; you should use context.CreateTimer instead.
The correct answer is correct because orchestrator functions in Azure Durable Functions must be completely deterministic. Because they replay their execution state, developers must avoid non-deterministic APIs such as Task.Delay, Guid.NewGuid, or DateTime.UtcNow. Instead, durable orchestrator APIs like context.CreateTimer must be used to schedule timers, as this registers the timer event in the orchestration history and allows the orchestrator to safely suspend execution without blocking resources.

Adım Adım Çözüm

1
Analyze the orchestrator code to identify non-deterministic or blocking APIs.
Identify the use of Task.Delay(TimeSpan.FromHours(24)) on the second line.
Orchestrator functions must be deterministic, and Task.Delay is non-deterministic because it does not register with the Durable Functions state store.
2
Determine the correct Durable Functions API to replace the non-deterministic call.
Identify context.CreateTimer as the appropriate API for scheduling delays in orchestrators.
context.CreateTimer creates a durable timer that persists its state and allows the orchestrator to sleep and replay correctly.
3
Evaluate the rest of the orchestration logic (Task.WhenAny, WaitForExternalEvent, and CallActivityAsync).
Confirm that task orchestration and external events are correctly structured using task combinators.
Task.WhenAny is the correct asynchronous, non-blocking method to wait for the first of multiple tasks to complete.

Anahtar Kavram

Durable Functions Orchestrator Determinism
Soru 2Soru

A backend API running on Azure Container Instances writes diagnostic log traces to Application Insights. You need to verify if any error-level logs have been recorded recently. Which Kusto Query Language (KQL) keywords complete the query to retrieve all traces with a severity level of 3 that occurred within the last 2 hours?

Aşağıdaki boşlukları doldurun


| where timestamp >
(2h)
| where severityLevel == 3
Cevabı ve açıklamayı göster

Cevap

The correct KQL query begins with the table name 'traces' and utilizes the 'ago' function to filter for records from the last 2 hours.
The correct query targets the 'traces' table to retrieve diagnostic logs and applies a time filter using the 'ago' function to restrict results to the last 2 hours.

Adım Adım Çözüm

1
Identify the correct telemetry table for log traces.
traces
Application Insights stores diagnostic log traces (such as those from standard logging frameworks) in the 'traces' table.
2
Identify the function used for relative time range filtering.
ago
The 'ago()' function is the standard KQL operator used to subtract a time span from the current UTC time.

Anahtar Kavram

Querying trace logs in Application Insights using Kusto Query Language (KQL)
Soru 3Soru

An organization is developing an ASP.NET Core Web App named ExpenseTracker. The application allows signed-in employees to submit business expenses. To support this, ExpenseTracker must perform the following actions:
1. Retrieve the profile details of the signed-in user from Microsoft Graph.
2. Retrieve a list of departments from a custom protected Web API named DepartmentService (App ID URI: api://departmentservice) on behalf of the signed-in user.

You need to configure the permissions in Microsoft Entra ID for the ExpenseTracker application registration while adhering to the principle of least privilege. Which of the following configuration steps should you perform? (Select TWO)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Add the User.Read delegated permission for the Microsoft Graph API.; Add the api://departmentservice/Departments.Read delegated permission for the DepartmentService API.

Cevap

Add the User.Read delegated permission for the Microsoft Graph API, and add the api://departmentservice/Departments.Read delegated permission for the DepartmentService API.
To access Microsoft Entra ID protected resources on behalf of a signed-in user, client applications must be configured with Delegated permissions. The User.Read delegated permission for Microsoft Graph is the least-privileged permission required to read the signed-in user's profile. For custom APIs, scopes must be defined in the target API's registration (e.g., api://departmentservice) and then consented to by the client app using the fully qualified scope syntax: api://departmentservice/Departments.Read.

Adım Adım Çözüm

1
Analyze the client application type and runtime context.
The client application is an ASP.NET Core Web App where users sign in, and API calls must be made on behalf of the signed-in user. This dictates the use of delegated permissions rather than application permissions.
Delegated permissions allow the application to act on behalf of the signed-in user, enforcing the user's specific access boundaries.
2
Identify the least-privileged Microsoft Graph permission needed to retrieve the user's profile.
The User.Read delegated permission is selected.
User.Read allows the application to read the profile of the signed-in user, which satisfies the first requirement under the principle of least privilege without exposing other users' profiles.
3
Determine the correct custom API scope and format for calling the DepartmentService API.
The api://departmentservice/Departments.Read delegated scope is selected.
Custom API scopes requested by external clients must use the fully qualified URI format (prefixed by the resource's App ID URI) to successfully resolve the resource during token acquisition.

Anahtar Kavram

Microsoft Entra ID Delegated Permissions and Scope Configuration
Soru 4Soru

You are developing a C# daemon application that runs as a background service on an on-premises Windows server. The application must connect to Azure Blob Storage to process files and authenticate to the Microsoft Identity Platform to obtain access tokens. The solution must meet the following security requirements:
- The application must authenticate without user interaction.
- Credentials must not be stored in cleartext in the application files.
- The authentication mechanism must follow the principle of least privilege.

You need to configure the authentication for the application using MSAL.NET. Which two actions should you perform?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Initialize the application using ConfidentialClientApplicationBuilder.Create(clientId).WithCertificate(certificate).Build() pointing to a locally installed certificate.; Request the access token by calling AcquireTokenForClient with the scope parameter set to https://storage.azure.com/.default.

Cevap

To securely configure MSAL.NET for the on-premises daemon application, you must use a certificate with ConfidentialClientApplicationBuilder and request the token via AcquireTokenForClient specifying the /.default scope.
A background daemon application running on-premises must authenticate without user interaction as a confidential client. Using a client certificate allows the application to authenticate securely to Microsoft Entra ID without exposing cleartext credentials in local configuration files. Furthermore, because daemon applications do not act on behalf of a user, they must request application-only permissions using the client credentials flow, which requires the scope to be configured with the default resource suffix (e.g., https://storage.azure.com/.default).

Adım Adım Çözüm

1
Determine the application type in MSAL.NET
Confidential Client Application
Since the application runs as a background service without user interaction, it is classified as a confidential client rather than a public client.
2
Select the secure credential mechanism
Client certificate configuration via WithCertificate
To satisfy the requirement of not storing credentials in cleartext (which rules out client secrets) and given the on-premises hosting context, a locally installed certificate must be used.
3
Determine the correct authentication flow and scope format
AcquireTokenForClient with the default resource scope
Daemon applications use the Client Credentials flow. This flow requires requesting the default scope of the resource (/.default) because there is no user context to delegate specific scopes.

Anahtar Kavram

Daemon applications using MSAL.NET must build confidential client instances using certificates for secure on-premises deployments and request tokens using the /.default scope.
Soru 5Soru

You are configuring diagnostics and telemetry for a .NET web application deployed to an Azure App Service that is currently hosted on a Basic (B1) App Service plan. You need to enable Application Insights Profiler to identify performance bottlenecks and hot paths. You also need to enable Snapshot Debugger to capture call stacks and local variables when unhandled exceptions occur. Developers must be able to view and download these debug snapshots in the Azure Portal. Which two actions must you perform? (Select two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Scale the App Service Plan to the Standard (S1) tier or higher.; Assign the Application Insights Snapshot Debugger role to the developers' Entra ID accounts.

Cevap

Scale the App Service Plan to the Standard (S1) tier or higher, and assign the Application Insights Snapshot Debugger role to the developers' Entra ID accounts.
To successfully implement Profiler and Snapshot Debugger, you must meet both the resource tier and identity access requirements. First, scaling the App Service Plan to Standard (S1) or higher is necessary because the Profiler does not run on Free, Shared, or Basic tiers. Second, assigning the Application Insights Snapshot Debugger role is mandatory because debug snapshots contain potentially sensitive execution state memory, meaning default roles like Reader or Monitoring Contributor cannot access them.

Adım Adım Çözüm

1
Evaluate the hosting plan compatibility for the Profiler feature.
Identify that the current Basic (B1) tier does not support Application Insights Profiler, requiring an upgrade to Standard (S1) or higher.
Profiler requires Standard or higher tiers due to compute resource availability and licensing constraints.
2
Evaluate the RBAC permissions required for developers to view call stacks and process memory snapshots.
Determine that standard Reader or Monitoring roles are insufficient, and specify that the Application Insights Snapshot Debugger role must be assigned.
Snapshots contain sensitive in-memory data, which requires a specialized role that explicitly grants access to the PII and debug variables.

Anahtar Kavram

Configuring requirements and access permissions for Application Insights Profiler and Snapshot Debugger.
Soru 6Soru

An organization deploys a background processing application to an Azure App Service Plan in the East US region. The application processes tasks from an Azure Service Bus queue named `task-queue` in the same region.

To handle spikes in workload, you configure an autoscale setting on the App Service Plan with the following scale-out rule:
- Metric source: Service Bus Queue (`task-queue`)
- Metric name: `ActiveMessages`
- Time Grain (Frequency): 11-minute
- Time Window: 1010-minutes
- Time Aggregation: `Total`
- Operator: `GreaterThan`
- Threshold: 500500
- Scale Action: Increase count by 22

During a period of stable, low traffic, the queue maintains a steady backlog of approximately 6060 active messages. However, you observe that the App Service Plan unexpectedly scales out to its maximum instance count.

Which of the following is the root cause of this unexpected scaling behavior?

Cevabı ve açıklamayı göster

Cevap: The `Total` time aggregation sums the samples over the 1010-minute window, resulting in an evaluated metric value of approximately 600600, which exceeds the threshold of 500500.

Cevap

The scale-out rule triggers because the 'Total' time aggregation sums the samples of the queue size (approximately 6060 messages) over the 1010-minute window (1010 samples of 11 minute each), resulting in an evaluated value of approximately 600600, which exceeds the threshold of 500500.
The correct answer is correct because using the 'Total' time aggregation sums the point-in-time samples of the queue size (approximately 6060 messages) over the 1010-minute window (1010 samples of 11 minute each), resulting in an aggregated value of approximately 600600. Since this value exceeds the threshold of 500500, it triggers the scale-out action. To monitor queue lengths correctly, 'Average' or 'Maximum' aggregation must be used.

Adım Adım Çözüm

1
Analyze the sampling rate and the time window of the autoscale metric trigger.
The rule uses a Time Grain (frequency) of 11 minute and a Time Window of 1010 minutes, meaning 1010 metric samples are collected and evaluated during each autoscale check.
To understand how the metric value is calculated, we must determine the number of samples collected within the evaluation window.
2
Calculate the aggregated metric value based on the 'Total' Time Aggregation type and the steady backlog.
Under a stable workload of 6060 messages, each of the 1010 samples has a value of approximately 6060. Using 'Total' aggregation, the sum of these samples is calculated: 60×10=60060 \times 10 = 600.
The 'Total' aggregation sums all samples in the time window rather than taking the average, minimum, or maximum value.
3
Compare the aggregated metric value against the configured scale-out threshold.
The calculated value of 600600 is compared to the threshold of 500500. Since 600>500600 > 500, the operator GreaterThan is satisfied, and the scale-out action (Increase count by 22) is triggered.
This explains why the App Service Plan scales out to its maximum instance count even under low, stable traffic.

Anahtar Kavram

Azure Monitor Autoscale Cross-Resource Metrics and Time Aggregation Types
Soru 7Soru

You have an Azure subscription with a Standard General Purpose v2 (GPv2) storage account named `medicalrecordsstore`. The container named `patients` contains the following block blobs:

* `patients/recordA.json`: Modified 120120 days ago. Tag: `ArchiveStatus` = `Ready`. No active lease.
* `patients/recordB.json`: Modified 110110 days ago. Tag: `archivestatus` = `Ready`. No active lease.
* `patients/recordC.json`: Modified 105105 days ago. Tag: `ArchiveStatus` = `Ready`. Has an active lease.

You implement the following lifecycle management policy:

{
"rules": [
{
"enabled": true,
"name": "archiveRule",
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"tierToArchive": {
"daysAfterModificationGreaterThan": 100
}
}
},
"filters": {
"blobTypes": ["blockBlob"],
"prefixMatch": ["patients/"],
"blobIndexMatch": [
{
"name": "ArchiveStatus",
"op": "==",
"value": "Ready"
}
]
}
}
}
]
}

After the policy runs, which blobs will be successfully transitioned to the Archive tier?

Cevabı ve açıklamayı göster

Cevap: Only patients/recordA.json and patients/recordC.json

Cevap

Only patients/recordA.json and patients/recordC.json will be transitioned to the Archive tier.
Only patients/recordA.json and patients/recordC.json are transitioned because they both exceed the 100100-day modification age limit and possess the exact case-sensitive tag key 'ArchiveStatus' with the value 'Ready'. The active lease on patients/recordC.json does not prevent the built-in lifecycle management service from modifying the blob tier.

Adım Adım Çözüm

1
Evaluate the modification time constraint.
All three blobs (recordA.json modified 120120 days ago, recordB.json modified 110110 days ago, and recordC.json modified 105105 days ago) exceed the threshold of 100100 days since last modification.
The actions.baseBlob.tierToArchive.daysAfterModificationGreaterThan filter specifies a duration of 100100 days.
2
Apply the blob index tag filter rules.
Only recordA.json and recordC.json match the filter key 'ArchiveStatus' with value 'Ready'.
Blob index tag filters are case-sensitive. The blob recordB.json has the tag key 'archivestatus' in lowercase, which fails to match the rule's uppercase key 'ArchiveStatus'.
3
Evaluate lease status constraints on the matching blobs.
Both recordA.json and recordC.json are successfully transitioned.
Azure Blob Storage lifecycle management policy actions are execution-exempt from client-side blob leases. An active lease on recordC.json does not block the platform from performing the tier transition.

Anahtar Kavram

Azure Blob Storage lifecycle management policy execution constraints, index tag case-sensitivity, and lease interaction.
Tahmini Süre:1m 30s
Soru 8Soru

You are developing a C# ASP.NET Core web application hosted on an Azure App Service. The App Service is already configured with a system-assigned managed identity to access an Azure SQL Database. You need to configure the App Service to access secrets in an Azure Key Vault. The Key Vault uses Azure Role-Based Access Control (Azure RBAC) for its data plane authorization. To minimize the security blast radius, you must use a user-assigned managed identity for Key Vault access. You must implement the solution using the Azure.Identity SDK and the DefaultAzureCredential class without modifying the initialization parameters of DefaultAzureCredential in your application code. Which sequence of steps should you perform to successfully retrieve the secrets?

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

The correct sequence of steps starts with creating the user-assigned managed identity, followed by assigning the Key Vault Secrets User RBAC role to the identity, associating the identity with the App Service, configuring the AZURE_CLIENT_ID app setting with the identity's client ID, and finally deploying the application code that instantiates the SecretClient using DefaultAzureCredential.
The correct sequence ensures that the user-assigned managed identity is first created to obtain its Client ID and Principal ID. Then, the identity is granted the Key Vault Secrets User role on the Key Vault. Next, the identity is linked to the App Service. After linking, the AZURE_CLIENT_ID app setting must be configured on the App Service to ensure that DefaultAzureCredential selects the user-assigned identity instead of the system-assigned identity. Finally, the application code is deployed, using DefaultAzureCredential to retrieve the secrets.

Adım Adım Çözüm

1
Provision the user-assigned managed identity.
A Microsoft Entra ID security principal is created, returning a unique Client ID and Principal ID.
The identity must exist before any configuration or permission assignment can refer to it.
2
Assign the Key Vault Secrets User RBAC role to the identity.
The identity is authorized to read secrets from the Key Vault.
Since the Key Vault uses Azure RBAC, the identity requires data plane permissions before code execution.
3
Associate the identity with the App Service.
The App Service is configured to host the user-assigned managed identity.
This allows the App Service's identity endpoint to authenticate requests on behalf of this identity.
4
Configure the AZURE_CLIENT_ID app setting.
The AZURE_CLIENT_ID environment variable is populated on the host container.
Since the App Service has both system-assigned and user-assigned identities, DefaultAzureCredential requires the AZURE_CLIENT_ID environment variable to select the correct user-assigned identity.
5
Instantiate SecretClient with DefaultAzureCredential and deploy the code.
The application successfully authenticates and retrieves the secrets.
The code relies on all previous configuration steps to successfully acquire a token and query the Key Vault.

Anahtar Kavram

Configuring user-assigned managed identities alongside system-assigned managed identities using DefaultAzureCredential and Azure RBAC in Azure App Service.
Tahmini Süre:3m 0s
Soru 9Soru

You are configuring an Azure Event Grid system topic to route system events to an Azure Function. To prevent event loss, you must configure dead-lettering to a secured Azure Storage account. The storage account has its firewall enabled, restricting access to virtual networks and trusted Microsoft services. Which configuration must you implement to authorize Event Grid to write the dead-letter events?

Cevabı ve açıklamayı göster

Cevap: Enable a system-assigned managed identity on the Event Grid topic, assign the identity the Storage Blob Data Contributor role on the storage account, and configure the event subscription to use this identity for dead-letter delivery.

Cevap

Enable a system-assigned managed identity on the Event Grid topic, assign the identity the Storage Blob Data Contributor role on the storage account, and configure the event subscription to use this identity for dead-letter delivery.
To write dead-letter events to an Azure Storage account protected by a firewall, Event Grid must be recognized as a trusted Microsoft service. This requires enabling a system-assigned (or user-assigned) managed identity on the Event Grid topic, granting that identity the Storage Blob Data Contributor role on the destination storage account, and configuring the event subscription to use the managed identity when delivering dead-letter events.

Adım Adım Çözüm

1
Enable Managed Identity on the Event Grid Resource
A system-assigned managed identity is generated for the Event Grid system or custom topic.
This establishes an identity in Microsoft Entra ID that Event Grid can use to authenticate with other Azure resources.
2
Grant RBAC Permissions on the Destination Storage Account
The Storage Blob Data Contributor role is assigned to the Event Grid managed identity.
This role provides the necessary write permissions to deposit dead-letter blobs into the container.
3
Configure the Event Subscription to Use the Identity
The event subscription is updated to include a dead-letter destination and configured to use the system-assigned managed identity for delivery.
This instructs Event Grid to present its managed identity token when attempting to write dead-letter events to the secured storage account.

Anahtar Kavram

Configuring Event Grid dead-lettering with managed identities to write to secured storage accounts.
Soru 10Soru

You are developing a background daemon service named DataArchiver that runs on a schedule to back up documents from all user OneDrive libraries to an Azure Blob Storage container. The service must authenticate silently without any user interaction.

You register DataArchiver in Microsoft Entra ID. You need to configure the permissions for Microsoft Graph to allow the service to read the files.

Which configuration should you apply to the application registration to meet the requirements while adhering to the principle of least privilege?

Cevabı ve açıklamayı göster

Cevap: Configure Microsoft Graph Application permissions for Files.Read.All, and obtain tenant-wide admin consent.

Cevap

Configure Microsoft Graph Application permissions for Files.Read.All, and obtain tenant-wide admin consent.
The correct configuration is to use Microsoft Graph Application permissions for Files.Read.All and obtain tenant-wide admin consent. Because the daemon runs as a background service without a signed-in user, it must authenticate as its own identity using Application permissions rather than Delegated permissions. Additionally, reading data across all users' OneDrive libraries is a high-privilege operation that requires tenant-wide admin consent.

Adım Adım Çözüm

1
Determine the authentication context and identity flow.
Since the service runs silently on a schedule with no user interaction, it must use the client credentials flow with Application permissions instead of Delegated permissions.
Delegated permissions require an active user session, whereas Application permissions allow a daemon or service to run autonomously.
2
Identify the Microsoft Graph permission required to read all users' OneDrive files.
The minimum permission needed to read files across all user libraries is Files.Read.All.
Following the principle of least privilege, Files.Read.All provides read access to all files, which is sufficient for backup purposes without granting write or delete privileges.
3
Determine the consent requirement.
Obtain tenant-wide admin consent for the Files.Read.All Application permission.
Application permissions that access organization-wide data (like Files.Read.All) cannot be consented to by regular users and require an administrator to grant consent tenant-wide.

Anahtar Kavram

Configuring Application Permissions and Consent for Daemon Apps
Tahmini Süre:1m 30s
Soru 11Soru

You are designing a monitoring solution for a message-processing application. The application processes messages from an Azure Service Bus queue named orders-queue. You must configure Azure Monitor to trigger an alert when the number of active messages in orders-queue exceeds 1,000. When the alert is triggered, it must perform the following actions:

1. Send an email notification to the operations manager.
2. Execute an Azure Function named ScaleProcessor to increase processing capacity.

Which two configurations are required to implement this solution? (Select TWO.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Create an action group that contains an Email receiver and an Azure Function receiver.; Create a metric alert rule that monitors the ActiveMessages metric of the queue.

Cevap

The correct configurations are to create an action group containing Email and Azure Function receivers, and to create a metric alert rule monitoring the ActiveMessages metric of the queue.
To satisfy the requirements, you need to monitor a quantitative, numerical metric (queue size) and trigger both a notification and custom automation code. The option stating to create an action group with Email and Azure Function receivers addresses the notification and execution requirements. The option stating to create a metric alert rule monitoring the ActiveMessages metric ensures that the alert fires immediately when the count exceeds 1,000.

Adım Adım Çözüm

1
Define notifications and automation
An Azure Monitor action group is configured with an Email receiver pointing to the operations manager's address and an Azure Function receiver pointing to the ScaleProcessor function.
Action groups centralize the execution of notification and remediation steps triggered by alerts.
2
Configure the metric alert source
A new metric alert rule is created with the target resource set to the orders-queue within the Service Bus namespace.
This establishes the scope of the alert to monitor queue-specific metrics.
3
Set the alert condition and link the action group
The metric alert condition is set to evaluate the ActiveMessages metric using a static threshold greater than 1,000, and the rule is linked to the created action group.
This completes the alert configuration, connecting the criteria to the automated actions.

Anahtar Kavram

Azure Monitor Metric Alerts and Action Group Receivers
Soru 12Soru

You are developing a web application named DocPortal. The application must perform the following security actions:
1. Allow users to sign in and view files stored in their personal OneDrive folders.
2. Allow a scheduled background service within the application to read group memberships across the tenant without a signed-in user.

You need to configure the Microsoft Graph permissions for the application registration. The solution must adhere to the principle of least privilege.

Which two permissions should you configure? (Select two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Files.Read configured as a Delegated permission.; GroupMember.Read.All configured as an Application permission.

Cevap

Configure Files.Read as a Delegated permission and GroupMember.Read.All as an Application permission.
Delegated permissions are required when the application needs to act on behalf of a signed-in user (such as reading the user's personal OneDrive files via Files.Read). Application permissions are required when the application runs as a background service without a user present (such as a scheduled job reading group memberships via GroupMember.Read.All). This configuration ensures proper identity context separation and complies with the principle of least privilege.

Adım Adım Çözüm

1
Determine the identity context for the first requirement.
The requirement calls for a signed-in user to access their own files, which requires a Delegated permission.
Delegated permissions run in the context of the signed-in user.
2
Identify the minimum required delegated scope for the first requirement.
The scope is Files.Read.
Files.Read provides read access to the signed-in user's files, fulfilling the least privilege concept.
3
Determine the identity context for the second requirement.
The requirement calls for a scheduled background service to read group memberships without a signed-in user, which requires an Application permission.
Application permissions run in the context of the application service principal rather than a user.
4
Identify the minimum required application scope for the second requirement.
The scope is GroupMember.Read.All.
GroupMember.Read.All is the least privileged application permission that allows reading group memberships.

Anahtar Kavram

Selecting and configuring the correct permission type (Delegated vs. Application) and scope for Microsoft Graph API integrations.
Soru 13Soru

You are developing a web application named ComplianceHub and a backend Web API named AuditAPI. Both applications are registered in Microsoft Entra ID. The applications must meet the following security requirements:

1. ComplianceHub must allow signed-in users to read their own audit reports from AuditAPI.
2. A background archiving service must run nightly to read all audit logs from AuditAPI without user interaction.

You need to configure the permissions and scopes for the application registrations. Which two configurations should you perform? (Select two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Configure AuditAPI to expose a delegated scope named Audits.Read, and grant the ComplianceHub app registration the delegated permission for api://<AuditAPI_App_ID>/Audits.Read.; Configure AuditAPI to expose an application permission (App Role) named Audits.Archive with the allowed member type set to Applications, grant ComplianceHub this permission, and obtain administrator consent.

Cevap

Configure the backend API to expose a delegated scope and grant the client application the delegated permission (api://<AuditAPI_App_ID>/Audits.Read) for user-interactive operations, and configure the backend API to expose an application permission (App Role) and obtain administrator consent for background operations.
The correct configurations involve defining a delegated scope on the API and granting it to the client for user-centric access, and defining an application permission (App Role) with admin consent for the service-to-service background access. For user-interactive access, the API exposes a scope (Audits.Read) and the client requests delegated access using the App ID URI prefix. For background access, the API exposes an App Role, which is assigned to the client application and requires admin consent.

Adım Adım Çözüm

1
Analyze the user-interactive requirement.
The client application must act on behalf of the signed-in user to access the API. This requires a delegated permission (scope) such as api://<AuditAPI_App_ID>/Audits.Read.
Delegated permissions allow applications to run in the context of a signed-in user, honoring their permissions and identity.
2
Analyze the background service requirement.
The service runs automatically without user interaction. This requires application permissions (App Roles) instead of delegated scopes.
Application permissions are used by daemon services or background tasks that run without a signed-in user.
3
Determine consent requirements.
Application permissions always require administrator consent, whereas delegated permissions for custom APIs may be consented to by users or administrators depending on the organization's policies.
Since application permissions grant access to data across the directory or service without user intervention, they carry higher risk and require admin approval.

Anahtar Kavram

Microsoft Entra ID delegated permissions (scopes) vs. application permissions (App Roles) and consent requirements.
Soru 14Soru

You are designing autoscale rules for various Azure workloads. Match each workload requirement on the left to the correct Azure Monitor Autoscale configuration pattern on the right to optimize resource scaling and prevent flapping.

Soldaki öğeye tıklayın, sonra eşleşen sağdaki öğeye tıklayın

Öğeler

Prevent transient CPU spikes lasting less than 55 minutes from triggering a scale-out action on an App Service plan.
Trigger a scale-out action when any individual virtual machine within a Virtual Machine Scale Set (VMSS) exceeds a memory utilization threshold.
Avoid rapid scale-out and scale-in oscillations (flapping) when configuring a scale-in rule for a queue-based processing workload.
Scale out a service based on the cumulative volume of transaction logs generated across all instances during a 1010-minute evaluation window.

Eşleşmeler

Cevabı ve açıklamayı göster

Cevap

To prevent transient spikes, configure the duration to 1010 minutes with Average Time Aggregation. To scale based on any individual instance, set the Metric Statistic (Instance Aggregation) to Maximum. To prevent flapping, use a sufficient margin between thresholds and a Cool-down period. To scale based on cumulative volume, set the Time Aggregation to Total.
The correct matches align with standard Azure Monitor autoscale rules: Average Time Aggregation over a 1010-minute window smooths out transient spikes under 55 minutes; setting Metric Statistic to Maximum ensures an individual instance triggering the threshold scales the group; appropriate threshold margins and Cool-down periods prevent flapping; and Total Time Aggregation is used to measure the aggregate volume of metrics over a time window.

Adım Adım Çözüm

1
Analyze transient spike prevention requirements.
Identify that short-term fluctuations must be averaged out over a window longer than the spike duration, mapping to 'Configure the metric trigger Duration to 1010 minutes and use Average Time Aggregation'.
This prevents single-minute spikes from skewing the autoscale decision prematurely.
2
Analyze individual instance behavior requirements.
Identify that the metric aggregation across instances (Metric Statistic) must be set to Maximum to catch when any single instance crosses the threshold, mapping to 'Set the Metric Statistic (Instance Aggregation) to Maximum for the Memory metric'.
By default, Azure Monitor averages metrics across all instances. Maximum ensures the highest loaded node triggers scaling.
3
Analyze flapping prevention requirements.
Identify that setting thresholds too close together or using short cool-downs causes loops. Mapping to 'Set a sufficient margin between scale-out and scale-in thresholds, and configure an adequate Cool-down period'.
Cool-down and threshold separation allow the system to reach a steady state before evaluating rules again.
4
Analyze cumulative volume scaling requirements.
Identify that cumulative counts require summing up values, mapping to 'Set the Time Aggregation to Total for the custom volume metric over the specified time window'.
Total aggregation represents the sum of all sample values in the window, capturing cumulative totals.

Anahtar Kavram

Azure Monitor Autoscale rule configuration parameters, including Time Aggregation, Metric Statistic (Instance Aggregation), Durations, and Cool-down periods to prevent flapping and optimize scaling behavior.
Tahmini Süre:2m 30s
Soru 15Soru

You are developing a C# background service that consumes events from an Azure Event Hub. The service must use the EventProcessorClient class from the Azure.Messaging.EventHubs.Processor library and utilize Azure Blob Storage for checkpointing and load balancing.

Which sequence of actions must you perform in your C# code to properly configure, run, and cleanly terminate the event processor?

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

To implement the EventProcessorClient lifecycle, you must first instantiate a BlobContainerClient, then pass it to initialize the EventProcessorClient, next bind delegate handlers to the ProcessEventAsync and ProcessErrorAsync properties, then invoke StartProcessingAsync to start processing, and finally call StopProcessingAsync to gracefully shut down the consumer.
The correct order follows the standard lifecycle of EventProcessorClient initialization and operation. You must first create the storage client since the event processor client depends on it. Once the processor is instantiated, handlers must be registered before the client is started. Finally, the client must be stopped cleanly when shutting down.

Adım Adım Çözüm

1
Create the BlobContainerClient instance.
A client reference to the Azure Blob Storage container is established.
The EventProcessorClient constructor requires an object implementing the CheckpointStore pattern, which is fulfilled by BlobContainerClient.
2
Construct the EventProcessorClient.
The EventProcessorClient is initialized with the connection string, hub name, consumer group, and storage client.
This establishes the client with the configuration metadata needed to coordinate with other instances.
3
Assign event and error handlers.
The processor is configured to invoke user code on receiving events or encountering errors.
The processor client will fail to start if the ProcessEventAsync and ProcessErrorAsync handlers are not registered.
4
Invoke StartProcessingAsync.
The background processing threads start, partition ownership is balanced, and event reading commences.
This initiates the active processing lifecycle of the consumer.
5
Invoke StopProcessingAsync.
Events stop being processed, partition ownership is released, and connections are closed.
This ensures a graceful shutdown without leaving stale partition leases in blob storage.

Anahtar Kavram

Lifecycle of EventProcessorClient with Blob Storage Checkpointing
Soru 16Soru

A background data synchronization service runs on an Azure App Service plan (Standard S2 tier) that is currently scaled to 33 instances. You need to configure autoscale rules for the App Service plan based on the CPU percentage metric. You define the following rules:

* Scale-out rule: Increase the instance count by 33 when the average CPU percentage is greater than 75%75\% for 10 minutes.
* Scale-in rule: Decrease the instance count by 33 when the average CPU percentage is less than a target threshold for 10 minutes.

Under a constant workload, you must prevent the autoscale engine from flapping (repeatedly scaling out and scaling in).

Which of the following configurations should you implement?

Cevabı ve açıklamayı göster

Cevap: Set the scale-in threshold to 30%30\%.

Cevap

Set the scale-in threshold to 30%30\%.
The correct option is to set the scale-in threshold to 30%30\%. To avoid flapping, the scale-in threshold must be strictly less than the average CPU load of the scaled-out instances under a constant workload. With 33 instances at a 75%75\% scale-out threshold, the total workload is 225%225\%. When the service scales out by 33 instances to a total of 66, the workload is distributed, resulting in an average CPU load of 37.5%37.5\%. Since 30%30\% is strictly less than 37.5%37.5\%, the scale-in rule will not immediately trigger, preventing flapping.

Adım Adım Çözüm

1
Calculate the total CPU capacity load required to trigger the scale-out rule.
3×75%=225%3 \times 75\% = 225\% total CPU load
This represents the minimum combined CPU capacity utilized across all instances just as the scale-out threshold is crossed.
2
Determine the new instance count after the scale-out action occurs.
3 instances+3 instances=6 instances3 \text{ instances} + 3 \text{ instances} = 6 \text{ instances}
The scale-out rule increases the capacity by 33 instances from the current base of 33.
3
Calculate the new average CPU percentage across all instances under the same constant workload.
225%/6=37.5%225\% / 6 = 37.5\% average CPU
Dividing the total CPU load by the new instance count gives the expected average CPU usage per instance after scaling.
4
Select a scale-in threshold that is strictly lower than the post-scale-out average CPU percentage.
30%30\% is the only valid configuration that is strictly lower than 37.5%37.5\% while remaining on a supported App Service tier.
If the scale-in threshold is greater than or equal to 37.5%37.5\% (e.g., 40%40\%, 45%45\%), the autoscale engine will immediately scale back down to 33 instances, causing flapping.

Anahtar Kavram

Avoiding Autoscale Flapping in Azure Monitor
Soru 17Soru

You are developing a Single Page Application (SPA) using React and MSAL.js to authenticate users and obtain tokens for a downstream Web API. During the application registration in Microsoft Entra ID, you configured the redirect URI as http://localhost:3000/callback. When testing the authentication flow, the user can successfully sign in and the application receives an authorization code. However, when MSAL.js attempts to exchange the authorization code for an access token by sending a POST request to the token endpoint, the browser blocks the request with a Cross-Origin Resource Sharing (CORS) error. Which of the following describes the cause of this issue and the correct action to resolve it?

Cevabı ve açıklamayı göster

Cevap: The redirect URI was registered under the Web platform in the App Registration. You must change the platform type of the redirect URI to Single-page application (SPA).

Cevap

The redirect URI must be registered under the Single-page application (SPA) platform in the App Registration to enable CORS support on the token endpoint.
The platform type of the redirect URI dictates how the Microsoft Identity Platform handles token requests. For SPAs, registering the redirect URI under the 'Single-page application' platform enables Cross-Origin Resource Sharing (CORS) on the token endpoint. Without this, the token endpoint does not send the required CORS headers, leading to browser-side errors during the authorization code exchange.

Adım Adım Çözüm

1
Analyze the CORS error generated when MSAL.js calls the token endpoint.
The token endpoint is blocking the request from the browser because it did not return the required Access-Control-Allow-Origin headers.
The browser blocks cross-origin requests unless the target resource explicitly allows the origin through CORS headers.
2
Inspect the application registration settings in Microsoft Entra ID.
Identify that the redirect URI is configured under the 'Web' platform type instead of the 'Single-page application' platform type.
The 'Web' platform type is designed for confidential clients (web servers) and does not support browser-based CORS operations at the token endpoint.
3
Change the platform type of the redirect URI in the App Registration.
Migrating the redirect URI to the 'Single-page application' platform enables CORS on the token endpoint for the registered origin and configures Authorization Code Flow with PKCE.
This updates the Entra ID security configuration to allow public browser clients to securely acquire tokens directly.

Anahtar Kavram

Entra ID App Registration Platform Types and CORS
Tahmini Süre:1m 30s
Soru 18Soru

A company implements an auditing application that processes financial messages. The application uses an Azure Cache for Redis instance to store temporary transaction states. It is critical that no cached transaction states are evicted under memory pressure, as this would cause auditing mismatches. Instead, if the cache memory limit is reached, the application must receive errors so it can temporarily throttle ingestion. Which eviction policy should you configure for the Azure Cache for Redis instance?

Cevabı ve açıklamayı göster

Cevap: noeviction

Cevap

noeviction
The correct policy is noeviction because it is the only policy that does not automatically delete keys when the cache fills up. Instead, it returns an out-of-memory (OOM) error on write operations, which allows the application to detect the limit and throttle message ingestion.

Adım Adım Çözüm

1
Determine the application's tolerance for data eviction.
The application requires that no cached transaction states be lost or evicted under memory pressure.
Evicting data would cause auditing mismatches and break core business logic.
2
Determine the expected application behavior when the cache limit is reached.
The application must receive errors so it can throttle ingestion.
Throttling requires a clear error signal from the database/cache layer when it cannot accept more writes.
3
Select the Redis maxmemory-policy that prevents eviction and returns out-of-memory errors.
The noeviction policy matches this behavior exactly.
Unlike other policies, noeviction returns an error on write commands rather than silently reclaiming space by deleting keys.

Anahtar Kavram

Azure Cache for Redis Eviction Policies
Soru 19Soru

You are developing a C# application that must send a batch of telemetry messages to an Azure Service Bus topic. You are using the Azure.Messaging.ServiceBus SDK. To ensure efficient network usage, you decide to send the messages in a single batch. Move the steps required to initialize the client, construct the batch, send the messages, and clean up resources into the correct chronological order.

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

The correct sequence is to first initialize the ServiceBusClient, then create the ServiceBusSender, followed by calling CreateMessageBatchAsync to prepare the batch. Next, add the messages using TryAddMessage, send the batch using SendMessagesAsync, and finally dispose of the sender and client.
The correct workflow requires establishing the client connection first, obtaining a sender, initializing a size-bounded batch, adding messages safely to that batch, calling the asynchronous send method, and then cleaning up the connection resources.

Adım Adım Çözüm

1
Instantiate ServiceBusClient
A ServiceBusClient object is initialized.
The client is required to connect to the namespace.
2
Create ServiceBusSender
A ServiceBusSender object is created.
The sender is required to send messages to the topic.
3
Initialize ServiceBusMessageBatch
A ServiceBusMessageBatch object is created.
The batch ensures the overall message sizes do not exceed service limits.
4
Add messages via TryAddMessage
Messages are added to the batch.
This safely checks size limits before sending.
5
Call SendMessagesAsync
The batch is sent.
Transmits the batch of messages in one network operation.
6
Dispose of client and sender
Resources are freed.
Prevents connection leaks and cleans up AMQP channels.

Anahtar Kavram

Message batching using the Azure.Messaging.ServiceBus C# SDK
Tahmini Süre:1m 30s
Soru 20Soru

You are configuring policies in Azure API Management (APIM) for a secure backend API. You must configure the policy to meet the following requirements:

1. Obtain an Entra ID token using the APIM instance's system-assigned managed identity for the database resource https://database.windows.net/ and use it to authenticate to the backend.
2. Retrieve an API key from Azure Key Vault using an APIM named value named kv-backend-key and send it to the backend in an HTTP header named X-API-Key.

Which two of the following XML snippets represent correct policy configurations that must be placed in the policy file to meet these requirements?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: <authentication-managed-identity resource="https://database.windows.net/" /> placed in the <inbound> section; <set-header name="X-API-Key" exists-action="override">
<value>{{kv-backend-key}}</value>
</set-header> placed in the <inbound> section

Cevap

The correct policy configurations require placing the authentication-managed-identity policy without a client ID inside the inbound section, and placing the set-header policy referencing the kv-backend-key named value in double curly braces inside the inbound section.
To authenticate with a system-assigned managed identity, the client-id attribute must be omitted from the authentication-managed-identity policy, and it must be placed in the inbound block so that it runs before the request reaches the backend. The custom header containing the secret is set in the inbound block using set-header and naming the target header, referencing the named value with double curly braces.

Adım Adım Çözüm

1
Determine the authentication mechanism.
Use <authentication-managed-identity resource="https://database.windows.net/" /> since omitting the client-id defaults to the system-assigned managed identity.
The system-assigned managed identity is requested, so no specific client ID should be declared.
2
Determine the proper placement for authentication.
Place the authentication-managed-identity snippet in the <inbound> section.
Authentication must occur before the gateway forwards the request to the backend service.
3
Determine how to reference the Named Value in the header.
Use the <set-header> policy with value referencing {{kv-backend-key}} inside the <inbound> section.
Named values in API Management are referenced using double curly braces to fetch the key vault secret dynamically.

Anahtar Kavram

API Management policies are configured in specific pipeline stages (inbound, backend, outbound, on-error) and can leverage system-assigned managed identities and named values to secure backend communication.
Tahmini Süre:1m 30s
Sayfa 1 / 49Sonraki