Tüm alıştırma soruları

972 soru

Soru 521Soru

An administrator reports that querying telemetry data in Log Analytics for an Azure App Service web application is frequently timing out and exceeding workspace query scan limits.

The `dependencies` table contains the following sample schema and records:

timestampnametargettypesuccessduration
2026-07-17T12:00:00ZGET /api/v1/orderssqlserver.database.windows.netSQLtrue120.0
2026-07-17T13:15:00ZPOST /paymentapi.stripe.comHTTPfalse2500.0
2026-07-17T14:30:00ZGET /user/profileapi.github.comHTTPfalse1800.0

You need to write an optimized Kusto Query Language (KQL) query that identifies the 95th percentile of the duration of all failed external HTTP dependency calls over the last 24 hours, grouped by the target of the dependency.

Which Kusto Query Language (KQL) query should you use to retrieve the required data while minimizing resource utilization?

Cevabı ve açıklamayı göster

Cevap: dependencies
| where timestamp > ago(24h)
| where success == false and type == "HTTP"
| summarize percentiles(duration, 95) by target

Cevap

The query that filters by timestamp > ago(24h) first, then filters by success and type, and aggregates using percentiles(duration, 95) by target.
The correct query filters the telemetry by timestamp at the very beginning of the pipeline using `where timestamp > ago(24h)`. In Kusto Query Language (KQL), filtering by time range as early as possible is a best practice because it limits the volume of data scanned by the query engine. It then filters for failed HTTP dependencies (`success == false and type == 'HTTP'`) before performing the `summarize percentiles(duration, 95) by target` aggregation, ensuring optimal performance and avoiding query timeouts or scan limit errors.

Adım Adım Çözüm

1
Identify the target table and initial optimization step.
The target table is dependencies. To optimize KQL query performance and avoid exceeding scan limits or causing timeouts, the time range filter must be applied immediately using `where timestamp > ago(24h)`.
Applying the time-range filter first ensures that only the relevant data partition is scanned by the query engine.
2
Apply the metric status and type filters.
Add the filters `where success == false and type == 'HTTP'` to isolate failed external HTTP dependency calls.
Filtering rows before aggregation reduces the dataset size and improves query execution speed.
3
Aggregate the data to calculate the 95th percentile.
Use `summarize percentiles(duration, 95) by target` to calculate the 95th percentile of duration for each target.
The percentiles function calculates the specified percentile value, which satisfies the requirement to find the 95th percentile rather than the average.

Anahtar Kavram

Optimizing KQL queries in Azure Application Insights by placing time-range filters as early as possible in the query pipeline to minimize scanned data volume and avoid query limits.
Soru 522Soru

You are developing a secure web application that runs on an Azure Virtual Machine. The application must generate a temporary URI to allow external clients to download PDF reports from a private Azure Blob Storage container named reports. To meet security requirements, you must not use storage account keys. Instead, you configure a User-Assigned Managed Identity for the Virtual Machine. In the application code, you successfully request a User Delegation Key and build a Shared Access Signature (SAS) token using the Azure.Storage.Blobs SDK. The SAS token is configured with read permissions and a lifetime of 11 hour. However, when external clients attempt to download a report using the generated SAS URI, they receive an HTTP 403403 (Forbidden) error. You verify that the Virtual Machine's managed identity has been assigned the Storage Blob Delegator role at the storage account level. Which action should you perform to resolve the HTTP 403403 error?

Cevabı ve açıklamayı göster

Cevap: Assign the Storage Blob Data Reader role to the managed identity at the storage account or container level.

Cevap

Assign the Storage Blob Data Reader role to the managed identity at the storage account or container level.
Assigning the Storage Blob Data Reader role to the managed identity is correct because a User Delegation SAS is authorized in two steps: first, the SAS token constraints are verified, and second, the Azure RBAC permissions of the Microsoft Entra ID principal that created the SAS are evaluated. The Storage Blob Delegator role only allows the managed identity to request a User Delegation Key; it does not grant permissions to read the container data. Assigning the Storage Blob Data Reader role resolves the HTTP 403 error by granting the identity the underlying data-plane permissions required to serve the read requests.

Adım Adım Çözüm

1
Analyze the authorization flow of a User Delegation SAS.
A User Delegation SAS requires both the SAS token permissions to be valid and the Microsoft Entra ID security principal (managed identity) that requested the User Delegation Key to have the appropriate Azure RBAC permissions to perform the action.
Unlike Service SAS or Account SAS (which only check the token's validity and permissions because they are signed by the root account key), a User Delegation SAS is constrained by the security principal's active roles.
2
Evaluate the current role assignments of the managed identity.
The managed identity is assigned the Storage Blob Delegator role, which only allows it to run the generateUserDelegationKey action. It has no data-plane roles (like Storage Blob Data Reader).
To identify why the SAS token results in an HTTP 403 Forbidden error, we must verify if the identity itself has read access to the blobs.
3
Select the minimum privilege role that allows reading blob data.
Assign the Storage Blob Data Reader role to the managed identity for the storage account or container containing the reports.
This grants the managed identity the necessary RBAC permissions to read the blobs, completing the second stage of the User Delegation SAS authorization check.

Anahtar Kavram

User Delegation SAS Authorization and RBAC Constraints
Tahmini Süre:2m 0s
Soru 523Soru

You are deploying an ASP.NET Core web application to an Azure App Service. The application must retrieve secrets from an Azure Key Vault using a user-assigned managed identity. The application code uses DefaultAzureCredential from the Azure.Identity SDK to authenticate. Which sequence of steps should you perform to configure the environment and enable secure access?

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

Cevabı ve açıklamayı göster

Cevap

First, create the user-assigned managed identity. Second, associate the identity with the App Service. Third, assign the Key Vault Secrets User RBAC role to the identity on the Key Vault. Finally, configure the AZURE_CLIENT_ID application setting on the App Service with the identity's client ID.
Configuring a user-assigned managed identity requires a specific sequence: you must create the standalone identity resource, associate it with the App Service resource, grant the identity permission to access the Key Vault, and configure the AZURE_CLIENT_ID app setting. Setting the AZURE_CLIENT_ID environment variable is necessary because DefaultAzureCredential will not automatically know which user-assigned identity to use without it.

Adım Adım Çözüm

1
Create the user-assigned managed identity resource.
A standalone identity resource is created with a unique Client ID and Principal ID.
The identity must exist in Microsoft Entra ID before it can be assigned to resources or granted RBAC roles.
2
Associate the identity with the App Service.
The App Service's identity configuration includes the resource ID of the user-assigned managed identity.
This configuration allows the App Service infrastructure to obtain Entra ID tokens on behalf of the user-assigned managed identity.
3
Assign the Key Vault Secrets User RBAC role to the identity's service principal.
The identity is authorized to access secrets within the Key Vault.
Azure Key Vault requires explicit data-plane permissions for identities to retrieve secrets.
4
Set the AZURE_CLIENT_ID environment variable in the App Service app settings.
The application's runtime environment includes the AZURE_CLIENT_ID setting.
DefaultAzureCredential requires this environment variable to distinguish between multiple potential identities when acquiring tokens for a user-assigned managed identity.

Anahtar Kavram

Configuration workflow for user-assigned managed identities with DefaultAzureCredential
Soru 524Soru

You are deploying a web application to multiple Azure App Services in different regions. The applications need to retrieve a database connection string stored in an Azure Key Vault named `kv-checkout-prod`.

The Azure Key Vault is configured to use the Azure role-based access control (Azure RBAC) permission model for authorization. To simplify permission management across all regions and avoid recreating role assignments when App Services are redeployed, you decide to use a single user-assigned managed identity named `id-checkout-prod`.

You need to configure the App Services to retrieve the secret value using this identity while adhering to the principle of least privilege.

Which configuration should you apply?

Cevabı ve açıklamayı göster

Cevap: Assign the Key Vault Secrets User role to the `id-checkout-prod` identity on the Key Vault, associate the identity with each App Service, set the `keyVaultReferenceIdentity` property of each App Service to the resource ID of the identity, and configure the application setting to `@Microsoft.KeyVault(SecretUri=https://kv-checkout-prod.vault.azure.net/secrets/DbConnectionString/)`.

Cevap

To resolve the secret value using a user-assigned identity, you must assign the Key Vault Secrets User role to the user-assigned identity, link it to the App Services, configure each App Service to use that identity for Key Vault references via the keyVaultReferenceIdentity property, and use the correct @Microsoft.KeyVault(SecretUri=...) reference syntax.
Assigning the Key Vault Secrets User role to the user-assigned identity, linking it to the App Services, setting the keyVaultReferenceIdentity property to the identity's resource ID, and using the correct @Microsoft.KeyVault(SecretUri=...) syntax is the correct configuration. This ensures that the App Service uses the user-assigned identity to resolve the Key Vault reference, that the identity has the necessary RBAC permissions to read the secret, and that the reference syntax is valid.

Adım Adım Çözüm

1
Identify the authentication and authorization requirements for the Key Vault.
Since the vault uses the Azure RBAC permission model, permissions must be managed using RBAC roles rather than access policies. The minimum privilege role for reading secrets is Key Vault Secrets User.
Access policies are ignored when Azure RBAC is enabled, and Key Vault Secrets User is the least-privileged role for retrieving secret values.
2
Determine how the user-assigned managed identity is configured for the App Service.
The user-assigned identity must be associated with the App Service, and the App Service's keyVaultReferenceIdentity property must be set to the identity's resource ID.
By default, App Service attempts to resolve Key Vault references using its system-assigned identity. To use a user-assigned identity instead, it must be explicitly configured as the keyVaultReferenceIdentity.
3
Verify the correct Key Vault reference syntax.
The correct format is @Microsoft.KeyVault(SecretUri=https://kv-checkout-prod.vault.azure.net/secrets/DbConnectionString/).
The reference syntax is strict and does not support inline identity parameters like Identity=id-checkout-prod.

Anahtar Kavram

Azure App Service Key Vault references with user-assigned managed identities and Azure RBAC authorization.
Soru 525Soru

An enterprise hotel management application uses Azure Cosmos DB to store reservation details. The container uses the guest's ID (guestId) as the partition key. You are writing a C# helper method using the Azure Cosmos DB .NET SDK v3 that retrieves an existing booking, modifies the check-out date, and saves the changes back to the database.

Which sequence of code statements must you execute to complete these tasks?

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

Cevabı ve açıklamayı göster

Cevap

Initialize the CosmosClient, obtain references to the database and container, execute ReadItemAsync to fetch the booking, modify the checkout date property, and call ReplaceItemAsync with the updated object and partition key.
To update an existing item in Azure Cosmos DB using the .NET SDK v3, you must first initialize a CosmosClient and drill down to the Container reference. From there, you perform a point read using ReadItemAsync to fetch the item, which requires the item ID and the PartitionKey. After modifying the deserialized object exposed via the Resource property of the response, you call ReplaceItemAsync, again specifying the updated object, the item ID, and the PartitionKey to save the changes.

Adım Adım Çözüm

1
Initialize the CosmosClient instance using the connection string.
A CosmosClient object is created to manage connections to the Azure Cosmos DB account.
The client is the entry point for all Cosmos DB SDK operations.
2
Get a Database reference using the client.
A Database object representing the target database.
You must drill down through the hierarchy to get a container reference.
3
Get a Container reference using the database.
A Container object representing the target container.
Item operations like ReadItemAsync and ReplaceItemAsync are invoked on the Container object.
4
Retrieve the booking item by calling ReadItemAsync.
An ItemResponse containing the Booking object in its Resource property.
You must read the current state of the document from the server before modifying it.
5
Modify the guest's checkout date property on the deserialized object.
The local Booking object has its checkout date updated.
The modification must be applied locally before being sent to the database.
6
Persist the modified object using ReplaceItemAsync.
The item is updated in the Cosmos DB container.
This updates the existing document on the server using its unique ID and partition key.

Anahtar Kavram

Performing point read and replacement operations on items using the Cosmos DB .NET SDK v3.
Soru 526Soru

You are preparing to deploy a secure backend microservice to Azure Container Apps. The container image for the microservice is stored in a private Azure Container Registry (ACR). You must configure the Container App to pull the image from the private ACR using a user-assigned managed identity. Which four actions should you perform in sequence? To answer, arrange the actions in the correct order.

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

Cevabı ve açıklamayı göster

Cevap

The correct sequence of actions is: 1) Create a user-assigned managed identity in Azure Active Directory / Microsoft Entra ID; 2) Assign the AcrPull role to the user-assigned managed identity at the scope of the Azure Container Registry; 3) Create an Azure Container Apps environment; 4) Deploy the Container App, configuring it to use the user-assigned managed identity for registry authentication.
The correct sequence begins by creating the user-assigned managed identity so that its identity credentials exist in Azure. Next, the AcrPull role must be assigned to this identity on the Azure Container Registry to authorize image retrieval. After ensuring the Azure Container Apps environment is created, the Container App can be deployed using the managed identity configuration to authenticate with the registry and pull the image.

Adım Adım Çözüm

1
Create a user-assigned managed identity.
The identity is provisioned with a unique principal ID and resource ID.
The identity must exist first so its credentials can be authorized on the registry and referenced during the Container App deployment.
2
Assign the AcrPull role to the managed identity.
The identity has read permissions to pull images from the registry.
Azure Container Apps requires the AcrPull role to authenticate with the private registry.
3
Create an Azure Container Apps environment.
The environment hosting container apps is provisioned.
An environment must exist before any Container Apps can be created inside it.
4
Deploy the Container App.
The Container App is running with the pulled image.
The final step configures the Container App to use the user-assigned identity for pulling the container image from the private ACR.

Anahtar Kavram

Deploying Azure Container Apps with Private Registry Authentication using Managed Identities
Soru 527Soru

You are configuring an Azure CDN Standard from Akamai endpoint to deliver a game configuration file named config.json for a mobile game. The mobile client appends a unique, dynamic user session identifier as a query string parameter, such as config.json?session=usr_98231, to every request. The configuration file contents are identical for all users and change only during scheduled maintenance. You need to configure the CDN endpoint to minimize origin server load and maximize cache performance. Which query string caching behavior should you configure?

Cevabı ve açıklamayı göster

Cevap: Ignore query strings

Cevap

Ignore query strings
Ignoring query strings is the optimal setting because the configuration file's content does not vary by user or session. By ignoring the unique session ID query parameter, Azure CDN caches the resource on the first request and serves that cached resource for all subsequent client requests, drastically improving cache hit ratio and reducing origin server load.

Adım Adım Çözüm

1
Analyze the request pattern and asset content.
The file config.json is identical for all users, but requests contain a unique query string parameter (session=usr_98231).
This helps determine if the query string modifies the returned content or if it is purely for tracking/telemetry at the origin.
2
Evaluate the impact of query string caching behaviors on cache hit ratio.
If query strings are cached uniquely or bypassed, cache performance drops significantly because each session ID is unique. If query strings are ignored, the CDN can serve the same cached config.json to all clients.
Choosing a caching strategy that ignores the session parameter ensures that the single static asset is cached and reused.
3
Select the query string caching mode that matches these requirements.
Configure 'Ignore query strings' to cache the asset once and ignore the dynamic session parameter.
This behavior maximizes the cache hit ratio and minimizes requests to the origin.

Anahtar Kavram

Azure CDN Query String Caching Behavior
Tahmini Süre:1m 30s
Soru 528Soru

You are deploying a C# ASP.NET Core web application to an Azure App Service. In the Program.cs file, you register the telemetry services using builder.Services.AddApplicationInsightsTelemetry(). After deploying and running the application, you observe that no telemetry data is displayed in your Application Insights resource in the Azure portal. Which of the following configuration issues is the most likely cause of this behavior?

Cevabı ve açıklamayı göster

Cevap: The Application Insights connection string was not defined in the application settings or environment variables.

Cevap

The Application Insights connection string was not defined in the application settings or environment variables.
The correct answer is correct because the Application Insights SDK needs to know where to send the collected telemetry. When builder.Services.AddApplicationInsightsTelemetry() is called, the SDK initializes. However, if the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable or configuration value is not set, no telemetry data will be sent to the Azure Monitor service.

Adım Adım Çözüm

1
Verify that builder.Services.AddApplicationInsightsTelemetry() is correctly executed during application startup.
The telemetry collection services are registered in the DI container.
Ensures the SDK is active and listening to application events.
2
Check the environment variables of the hosting environment for the connection string configuration.
The APPLICATIONINSIGHTS_CONNECTION_STRING variable is missing or empty.
The SDK needs this value to know where to transmit the collected telemetry data.

Anahtar Kavram

Application Insights SDK requires a valid Connection String to send telemetry data to the correct Azure resource.
Soru 529Soru

An organization has a web application deployed to Azure App Service named app-payment-prod. The application needs to retrieve a database connection string stored as a secret in an Azure Key Vault named kv-payment-prod. The Key Vault is configured to use the Azure Role-Based Access Control (Azure RBAC) authorization model. You must implement access using the principle of least privilege. Which set of configuration steps should you perform to grant the web application access to the Key Vault secret?

Cevabı ve açıklamayı göster

Cevap: Enable a system-assigned managed identity on the App Service. Assign the 'Key Vault Secrets User' Azure RBAC role to the identity's service principal at the scope of the Key Vault. Reference the secret in the App Service settings using the syntax: @Microsoft.KeyVault(SecretUri=https://kv-payment-prod.vault.azure.net/secrets/db-conn-string/)

Cevap

Enable a system-assigned managed identity on the App Service, assign the 'Key Vault Secrets User' Azure RBAC role to the identity at the Key Vault scope, and reference the secret using the '@Microsoft.KeyVault(SecretUri=...)' syntax.
The correct configuration enables the system-assigned managed identity on the App Service, grants it the 'Key Vault Secrets User' role under the Azure RBAC model, and references the secret using the correct '@Microsoft.KeyVault(SecretUri=...)' syntax. This satisfies the requirement of using the Azure RBAC model, enforces least privilege (by avoiding administrative roles like 'Secrets Officer' or 'Administrator'), and uses valid parsing syntax.

Adım Adım Çözüm

1
Configure the web application identity
Enable a system-assigned managed identity on the App Service
This establishes a security principal in Microsoft Entra ID (Azure Active Directory) that is tied to the lifecycle of the App Service.
2
Assign authorization permissions
Assign the 'Key Vault Secrets User' Azure RBAC role to the managed identity's service principal at the scope of the Key Vault
Since the vault uses the Azure RBAC model, access policies are ignored. The 'Key Vault Secrets User' role grants read access to secret values without granting unnecessary administrative permissions, satisfying the least-privilege requirement.
3
Define Key Vault references in application settings
Set the environment variable value using the '@Microsoft.KeyVault(SecretUri=...)' syntax
This enables the App Service to automatically resolve the secret from the Key Vault at runtime and expose it as a standard environment variable to the application code.

Anahtar Kavram

Configuring App Service Key Vault references with Azure RBAC and Managed Identities
Tahmini Süre:2m 30s
Soru 530Soru

An Azure App Service web application logs performance and error telemetry to an Azure Application Insights resource. You need to write a Kusto Query Language (KQL) query to retrieve the top 10 slowest external dependency calls based on their average duration over the past 24 hours. The results must only include dependencies associated with failed web requests. To prevent query performance degradation and avoid scanning excessive telemetry data outside the target window, the query must be optimized. Which KQL query should you execute?

Cevabı ve açıklamayı göster

Cevap: let failed_requests = requests
| where timestamp > ago(24h) and success == false
| project operation_Id;
dependencies
| where timestamp > ago(24h)
| join kind=inner failed_requests on operation_Id
| summarize AvgDuration = avg(duration) by name
| top 10 by AvgDuration desc

Cevap

The query that filters both the requests and dependencies tables by timestamp greater than 24 hours ago before joining them on the operation_Id field, and then summarizes the average duration grouped by name to return the top 10 results.
The correct query applies the timestamp filter to both the requests table and the dependencies table before performing the join. In KQL, filtering all joined tables by time restricts the scanned dataset size on both inputs, ensuring maximum query efficiency and preventing timeouts.

Adım Adım Çözüm

1
Filter the requests table to include only failed requests (success == false) within the last 24 hours, projecting only the operation_Id column to reduce memory usage during the join.
A lightweight temporary table/set named failed_requests containing only relevant operation IDs.
Reduces the volume of request data that needs to be joined.
2
Filter the dependencies table to include only dependencies logged in the last 24 hours.
A subset of the dependencies table containing only telemetry from the last 24 hours.
Prevents scanning the entire retention history of the dependencies table prior to the join.
3
Perform an inner join between the filtered dependencies and failed_requests on the operation_Id column.
A combined dataset of dependencies that correspond directly to failed requests in the last 24 hours.
Correlates dependency calls with the failed web requests they were part of.
4
Calculate the average duration for each dependency name using summarize and select the top 10 slowest dependencies.
The top 10 slowest external dependency calls by average duration.
Identifies the highest latency dependencies associated with request failures.

Anahtar Kavram

Optimizing KQL queries in Azure Application Insights by applying time-range filters to both sides of a join operation to minimize resource consumption.
Soru 531Soru

You are configuring a Java web application hosted on Azure App Service to load configuration settings from an Azure App Configuration store. The application needs to retrieve a database password stored in an Azure Key Vault named kv-prod.

In the Azure App Configuration store, you create a key-value pair where the key is DbPassword and the value is set to {"uri":"https://kv-prod.vault.azure.net/secrets/db-pass"}. During application startup, the App Configuration provider library retrieves the DbPassword configuration, but logs show the value is received as the raw JSON string {"uri":"https://kv-prod.vault.azure.net/secrets/db-pass"} instead of the resolved secret. The App Service is configured with a system-assigned managed identity that has the 'Key Vault Secrets User' role on kv-prod.

Which of the following actions should you take to ensure the secret is correctly resolved by the application?

Cevabı ve açıklamayı göster

Cevap: Update the content-type of the DbPassword key-value in Azure App Configuration to application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8.

Cevap

Update the content-type of the DbPassword key-value in Azure App Configuration to application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8.
The correct action is to set the content-type of the key-value pair to application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8. Azure App Configuration client SDKs identify Key Vault references using this metadata. If it is missing or incorrect, the SDK retrieves the value as a plain JSON string rather than resolving the secret from the Key Vault.

Adım Adım Çözüm

1
Analyze how Azure App Configuration distinguishes Key Vault references from standard string values.
Identify that the client SDK checks the key-value's content-type metadata to determine if it should resolve a secret.
If the content-type is empty or set to a standard type like text/plain, the SDK treats the value as a literal string.
2
Verify the permission model for Key Vault reference resolution.
Confirm that the application's identity (the App Service's system-assigned managed identity) is the one that needs access to Key Vault.
Because resolution is performed client-side by the client provider library, the application's credentials are used to fetch the secret from Key Vault.
3
Apply the correct configuration format in Azure App Configuration.
Update the key-value's content-type to application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8.
This content-type instructs the provider library to parse the JSON value, retrieve the URI, and fetch the secret value from Key Vault at runtime.

Anahtar Kavram

Key Vault references in Azure App Configuration require a specific content-type header and are resolved client-side by the application SDK using the application's identity.
Soru 532Soru

You are designing an Azure Durable Functions application to orchestrate a nightly data migration process. The workflow starts by retrieving a list of database tables and then fans out to run a migration activity function for each table in parallel. The activity function for each table performs heavy data transformations and can take up to 20 minutes to complete. The migration process must run securely, requiring the functions to access an Azure SQL Database via a private endpoint, which necessitates virtual network (VNet) integration. You need to select the most cost-effective Azure Functions hosting plan that supports both the execution time and the network requirements. Which Azure Functions hosting plan should you choose?

Cevabı ve açıklamayı göster

Cevap: Premium plan

Cevap

The Premium plan is the most cost-effective hosting plan that meets the requirements.
The Premium plan is correct because it supports regional virtual network integration, allowing secure access to services via private endpoints. It also offers unbounded execution limits (guaranteed up to 30 minutes and configurable to run indefinitely), accommodating the 20-minute execution duration. Additionally, it supports dynamic scaling, which is ideal for handling the nightly parallel fan-out workload efficiently.

Adım Adım Çözüm

1
Analyze the execution duration requirement.
The activity functions can take up to 20 minutes to complete. This rules out the Consumption plan, which has a maximum execution timeout of 10 minutes.
Azure Functions hosting plans have different execution duration limits.
2
Analyze the network isolation requirement.
The function must connect to an Azure SQL Database via a private endpoint, which requires regional VNet integration. This rules out both the Consumption plan and the Basic App Service plan.
VNet integration is only supported on Premium and Standard or higher App Service (Dedicated) plans.
3
Evaluate scaling and cost effectiveness for a nightly parallel workflow.
The workflow runs once a day (nightly) and requires rapid scale-out to process multiple migration tasks in parallel. The Premium plan scales out dynamically and only charges for resource usage during execution (with a minimum of one pre-warmed instance), making it more cost-effective and performant than a Dedicated plan which bills 24/7 and does not scale out as dynamically.
Comparing Premium and Dedicated plans for dynamic workloads.

Anahtar Kavram

Selecting the appropriate Azure Functions hosting plan based on execution limits, VNet integration requirements, scaling behaviors, and cost efficiency.
Soru 533Soru

Your team is configuring a distributed C# application hosted on an Azure Virtual Machine Scale Set (VMSS) to access an Azure Storage account. Multiple VMSS instances will be scaled out and in dynamically. The identity used for accessing the storage account must persist independently of the VMSS lifecycle.

Which two configurations are required to ensure the application can successfully authenticate and read blobs from the storage account using the Azure.Identity library? (Select two.)

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

Cevabı ve açıklamayı göster

Cevap: Assign the Storage Blob Data Reader role to the user-assigned managed identity at the storage account resource scope.; Instantiate the DefaultAzureCredential class by passing a DefaultAzureCredentialOptions instance with the ManagedIdentityClientId property set to the client ID of the user-assigned managed identity.

Cevap

To implement this solution, you must assign the Storage Blob Data Reader role to the user-assigned managed identity at the storage account scope, and instantiate the DefaultAzureCredential class by passing a DefaultAzureCredentialOptions instance with the ManagedIdentityClientId property set to the client ID of the user-assigned managed identity.
To ensure the managed identity persists independently of the Virtual Machine Scale Set lifecycle, a user-assigned managed identity must be used instead of a system-assigned one. The user-assigned identity must be granted appropriate access permissions, such as the Storage Blob Data Reader role at the storage account scope. When using DefaultAzureCredential with a user-assigned identity in code, the identity's client ID must be specified (for example, via DefaultAzureCredentialOptions) so that the credential knows which identity to use for token acquisition.

Adım Adım Çözüm

1
Select the correct identity type based on the lifecycle requirements.
A user-assigned managed identity is chosen because it exists as a standalone Azure resource and persists independently of the VMSS lifecycle.
System-assigned identities are deleted when the VMSS is deleted, which would violate the persistence requirement.
2
Assign the appropriate RBAC permissions.
The user-assigned identity is assigned the 'Storage Blob Data Reader' role at the storage account scope.
This grants the identity permission to read blob data from the storage account.
3
Configure the application credential usage in code.
The application code instantiates DefaultAzureCredential by explicitly setting the ManagedIdentityClientId property to the Client ID of the user-assigned identity.
Providing the Client ID is required so that DefaultAzureCredential can identify and use the correct user-assigned identity for token acquisition.

Anahtar Kavram

Selecting and configuring user-assigned managed identities for applications with dynamic lifecycles using the Azure SDK.
Soru 534Soru

You are developing a worker utility in C# that processes queue messages. You need to configure Application Insights telemetry programmatically without using dependency injection. Complete the following C# code snippet to initialize the telemetry configuration and apply the connection string. What are the correct API members to write in the blanks?

Aşağıdaki boşlukları doldurun

TelemetryConfiguration config = TelemetryConfiguration.();
config.
= "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://eastus-0.in.applicationinsights.azure.com/";
TelemetryClient client = new TelemetryClient(config);
Cevabı ve açıklamayı göster

Cevap

Use 'CreateDefault' to instantiate the default configuration and 'ConnectionString' to set the Azure Monitor connection string.
To manually configure telemetry in C#, TelemetryConfiguration.CreateDefault() is invoked to create a configuration instance with default settings. The ConnectionString property is then assigned the connection string of the Application Insights resource. A TelemetryClient is subsequently initialized using this configuration.

Adım Adım Çözüm

1
Identify the factory method on TelemetryConfiguration to instantiate the configuration.
TelemetryConfiguration.CreateDefault()
It returns a new TelemetryConfiguration instance pre-configured with standard telemetry initializers and channels.
2
Identify the property of TelemetryConfiguration that holds the ingestion parameters.
ConnectionString
The ConnectionString property replaced the deprecated InstrumentationKey property to route and authenticate telemetry data securely.

Anahtar Kavram

Manual initialization of Application Insights telemetry configuration in .NET applications
Soru 535Soru

You are developing a serverless workflow using Azure Durable Functions. You need to sequence the execution and replay steps of a basic orchestration that starts, runs a single activity function, and completes. Move the events to the correct order in which they occur during this execution lifecycle.

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

Cevabı ve açıklamayı göster

Cevap

The correct order of events is: client function initiates the orchestrator instance, the orchestrator executes and schedules the activity function, the orchestrator yields control and suspends execution, the activity function executes and stores its result, and the orchestrator replays history to restore state and continue.
The correct order follows the standard Durable Functions event sourcing replay pattern: the client initiates the orchestrator; the orchestrator executes, schedules the activity, and yields control; the activity executes on a worker; and finally, the orchestrator wakes up, replays history, and continues execution with the activity result.

Adım Adım Çözüm

1
Initiate the orchestration instance.
The client function calls StartNewAsync, placing a start message in the control queue.
Durable Functions orchestrations must be started by a client function using the client binding.
2
Execute the orchestrator and schedule the activity.
The orchestrator begins execution and runs until the await statement, scheduling the activity in the work-item queue.
The orchestrator runs single-threaded code up to the first asynchronous operation, creating execution history.
3
Yield and sleep the orchestrator.
The orchestrator yields control, writes its state to the storage table, and goes to sleep.
Durable Functions optimize resource usage by not keeping orchestrators active while waiting for activities to complete.
4
Execute the activity function.
A worker picks up the activity, executes it, and writes the output back to the history storage.
Activities run separately from the orchestrator, and their output must be persisted to allow the orchestrator to rebuild state.
5
Wake up and replay the orchestrator.
The orchestrator is re-enqueued, restarts execution from the beginning, and uses history to reconstruct state and skip re-executing the completed activity.
The orchestrator relies on event sourcing (replay) to ensure determinism and recover local variables/state without repeating activities.

Anahtar Kavram

The execution replay lifecycle of Durable Functions ensures state persistence and scalability by suspending and reconstructing the orchestrator state from execution history.
Soru 536Soru

You are designing an integration solution that uses Azure Event Grid to route messages to a custom Webhook endpoint. You need to configure an Event Grid subscription for a custom topic with the following requirements:
- The subscription must write any events that cannot be delivered to an Azure Blob Storage container named undelivered.
- The subscription must authenticate to the Storage account using its own system-assigned managed identity to write the dead-lettered events.
- The Webhook endpoint must successfully receive events by completing the standard synchronous validation handshake during subscription creation.

Which set of configurations must you implement to meet these requirements?

Cevabı ve açıklamayı göster

Cevap: Configure the Webhook to return the validation code from the validation event payload in the response body. Enable the system-assigned managed identity on the Event Grid subscription and assign it the Storage Blob Data Contributor role on the Storage account.

Cevap

Configure the Webhook to return the validation code from the validation event payload in the response body. Enable the system-assigned managed identity on the Event Grid subscription and assign it the Storage Blob Data Contributor role on the Storage account.
The configuration that returns the validation code from the validation event payload in the response body correctly completes the synchronous subscription handshake. Enabling the system-assigned managed identity and granting it the Storage Blob Data Contributor role provides the Event Grid subscription with the necessary write permissions to save dead-lettered events to the storage container.

Adım Adım Çözüm

1
Implement the endpoint validation handshake logic in the Webhook API.
The Webhook parses the validation code from the validation event and returns it in the response body to successfully complete the synchronous handshake.
Event Grid requires subscribers to prove ownership of the endpoint before delivering events.
2
Enable the system-assigned managed identity on the Event Grid subscription resource.
An identity is registered in Microsoft Entra ID for the subscription.
This identity will be used to authenticate write requests to the Storage account without using credentials.
3
Assign the Storage Blob Data Contributor role to the managed identity on the destination Storage account or container.
The managed identity has write access to the Blob Storage container.
Event Grid dead-lettering requires write permissions to write failed delivery events to the designated blob container.

Anahtar Kavram

Azure Event Grid webhook endpoint validation and dead-lettering with managed identities.
Soru 537Soru

You are implementing an Azure Event Grid solution. You need to configure dead-lettering for an Event Grid subscription that routes events from a custom topic to an Azure Queue Storage queue. The dead-lettered events must be securely stored in an Azure Blob Storage container using a system-assigned managed identity.

Which four actions should you perform in sequence to configure and test this dead-lettering solution? To answer, arrange the actions in the correct order.

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

Cevabı ve açıklamayı göster

Cevap

To configure dead-lettering with a system-assigned managed identity, you must first create the Azure Storage account and Blob Storage container. Next, assign the Storage Blob Data Contributor role to the Event Grid system-assigned managed identity on the Storage account. Then, create the Event Grid subscription, specifying the Queue Storage queue as the endpoint and configuring the Blob container for dead-lettering. Finally, test the configuration by publishing events that fail delivery to verify they are dead-lettered.
The correct sequence starts with creating the Storage account and Blob container. Next, permissions must be configured by assigning the Storage Blob Data Contributor role to the Event Grid system-assigned managed identity on the Storage account, which allows Event Grid to write the dead-lettered events. After permissions are established, you create the Event Grid subscription, specifying the Queue Storage queue as the endpoint and configuring the dead-letter destination. Finally, you publish test events that fail delivery to verify that they are correctly written to the Blob container.

Adım Adım Çözüm

1
Create the target Storage account and Blob container.
The destination storage resources are provisioned.
The dead-letter container must exist before permissions can be granted or the configuration is applied.
2
Assign the Storage Blob Data Contributor role to the Event Grid system-assigned managed identity on the Storage account.
Event Grid is authorized to write blobs to the storage account.
Event Grid requires write permissions to the storage account to upload dead-lettered events. Without this step, subscription creation will fail validation.
3
Create the Event Grid subscription and define both the endpoint and dead-letter settings.
The Event Grid subscription is created and active.
The subscription links the custom topic to the Queue Storage queue and references the Blob container for dead-lettering.
4
Publish events designed to fail delivery (e.g., targeting a non-existent handler or exceeding retry limits).
The failed events appear in the Blob Storage container.
This verifies that the entire pipeline, including routing and security configuration, works correctly.

Anahtar Kavram

Configuring dead-lettering with managed identity authorization in Azure Event Grid subscriptions.
Soru 538Soru

An enterprise web application is hosted on a Windows-based Azure App Service. The application occasionally returns HTTP 500 Internal Server Error responses during startup and routing processes, but standard application traces do not contain enough detail about which IIS module or pipeline step is causing the failure. You need to capture detailed trace reports for these specific HTTP 500 errors, including the execution time and status of each IIS module in the request pipeline. Which diagnostic logging feature should you enable?

Cevabı ve açıklamayı göster

Cevap: Failed Request Tracing

Cevap

Failed Request Tracing
Failed Request Tracing provides detailed XML-formatted trace files for requests that match specific criteria, such as HTTP 500 errors. These traces show the step-by-step execution of IIS modules, along with execution duration and failure details, making it the correct choice for troubleshooting IIS pipeline failures.

Adım Adım Çözüm

1
Analyze the diagnostic requirement.
The requirement specifies capturing detailed execution traces of IIS modules and pipeline execution times for HTTP 500 errors.
This narrows down the potential diagnostic logging features available in Azure App Service on Windows.
2
Evaluate built-in Windows App Service logging options.
Failed Request Tracing captures XML logs detailing IIS pipeline events; Detailed Error Messages captures static HTML error pages; Web Server Logging captures W3C HTTP traffic logs; Application Logging captures application-written traces.
Distinguishing between these options helps pinpoint the specific tool designed for pipeline-level tracing.
3
Select the feature that matches the XML-based pipeline trace requirement.
Failed Request Tracing is the only option that tracks individual IIS module execution and saves it in XML format under %HOME%/LogFiles/W3SVCxxxx.
Enabling this feature solves the problem of finding which IIS module caused the HTTP 500 error.

Anahtar Kavram

Distinguishing between built-in Azure App Service diagnostic logging types (Application Logging, Web Server Logging, Detailed Error Messages, and Failed Request Tracing) on Windows hosting plans.
Soru 539Soru

You are developing a C# backend service for a multi-tenant SaaS document editor. The Azure Cosmos DB container contains document metadata and is configured with Session consistency. The container's partition key is `/tenantId`.

Initially, the development team considered partitioning the container by a status field, `/isArchived`, but chose `/tenantId` to avoid hot partitions.

A user reports that when they modify a document on one device, the updated metadata is not immediately visible when they open the application on another device (which runs in a separate client session). You capture the session token from the write operation's response on the first device as `capturedSessionToken`.

You need to perform a point read on the second device to guarantee that the user reads the latest update.

Which C# code segment should you use?

Cevabı ve açıklamayı göster

Cevap: ItemRequestOptions options = new ItemRequestOptions { SessionToken = capturedSessionToken };
ItemResponse<DocumentMetadata> response = await container.ReadItemAsync<DocumentMetadata>(
documentId,
new PartitionKey(tenantId),
options
);

Cevap

ItemRequestOptions options = new ItemRequestOptions { SessionToken = capturedSessionToken };
ItemResponse<DocumentMetadata> response = await container.ReadItemAsync<DocumentMetadata>(
documentId,
new PartitionKey(tenantId),
options
);
The correct option uses the standard Cosmos DB .NET SDK v3 ReadItemAsync method, specifies the correct partition key, and utilizes ItemRequestOptions to pass the captured session token. This ensures read-your-writes consistency across distinct client sessions under Session consistency.

Adım Adım Çözüm

1
Instantiate the ItemRequestOptions object and set its SessionToken property to the captured session token from the write operation.
An options object containing the write operation's session token is ready.
This is required to propagate the session context to the separate client session on the second device.
2
Call ReadItemAsync on the Container instance, passing the documentId, the partition key value wrapped in a PartitionKey object, and the request options.
A point read is performed targeting the correct logical partition with the session token context.
Passing the correct partition key is required for all item operations in Cosmos DB SDK v3, and the session token guarantees read-your-writes consistency.

Anahtar Kavram

Session consistency token propagation and point reads using Cosmos DB .NET SDK v3
Soru 540Soru

You are developing an ASP.NET Core Web API named InventoryAPI that exposes operations to manage warehouse inventory. You register InventoryAPI in Microsoft Entra ID. You need to configure permissions and scopes to support the following client applications:

1. InventorySPA: A Single Page Application where warehouse employees sign in and manage stock. The application must perform operations on behalf of the signed-in user.
2. InventoryDaemon: A background console application that syncs stock levels from an external system overnight. The daemon runs without user interaction.

Which two configurations should you perform to support these applications using the principle of least privilege?

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

Cevabı ve açıklamayı göster

Cevap: Expose a delegated scope named Inventory.ReadWrite in the API registration for InventoryAPI, and grant the InventorySPA application delegated permission to access this scope.; Define an App Role named Inventory.ReadWrite.All in the API registration for InventoryAPI, and grant the InventoryDaemon application application permission to access this role.

Cevap

Expose a delegated scope named Inventory.ReadWrite for the Single Page Application, and define an App Role named Inventory.ReadWrite.All for the daemon service.
The correct options are to expose a delegated scope for the browser-based Single Page Application (where employees sign in) and to define an App Role (application permission) for the background daemon service (which runs without user interaction).

Adım Adım Çözüm

1
Analyze the identity context for the Single Page Application (InventorySPA).
Since warehouse employees sign in and perform actions, the application operates under a user session, requiring Delegated permissions.
Delegated permissions allow the application to act on behalf of the signed-in user.
2
Expose the API scope for the delegated access.
Expose a custom scope (e.g., Inventory.ReadWrite) in the API registration of InventoryAPI and configure the SPA to request delegated permissions for it.
This establishes the scope boundary for user-delegated actions.
3
Analyze the identity context for the background runner (InventoryDaemon).
Since the daemon runs on a schedule without user interaction, it cannot have a signed-in user, requiring Application permissions.
Application permissions allow applications to run non-interactively using their own identity.
4
Define and assign the App Role.
Define an App Role (e.g., Inventory.ReadWrite.All) within the API registration of InventoryAPI, and assign it to the daemon's service principal as an application permission.
This allows the daemon to authenticate using client credentials flow and obtain tokens containing the required application role.

Anahtar Kavram

Microsoft Entra ID distinguishes between Delegated permissions (used when a signed-in user is present) and Application permissions (used by background daemons or services without a signed-in user). API creators expose delegated permissions as scopes and application permissions as App Roles.
ÖncekiSayfa 27 / 49Sonraki
Tüm alıştırma soruları — Microsoft Azure Developer (AZ-204) | Examkin