All practice questions
972 questions
A developer is configuring a data retention policy for a Standard General Purpose v2 (GPv2) storage account. The goal is to automatically transition specific blobs to the Archive tier when they are no longer actively needed. The developer plans to identify target blobs using the index tag `ArchiveStatus = 'Pending'`. Which sequence of steps must the developer perform to configure, apply, and verify this lifecycle management policy?
Drag items to arrange them in the correct order
Your development team is implementing a data migration service using the Azure.Storage.Blobs SDK (version 12.x) to migrate large media files from a source container in storage account 'mediaflowsource' to a destination container in storage account 'mediaflowdest' across different Azure regions. The destination blobs are locked with active leases to prevent accidental deletion during the process, and you must overwrite them with the new versions while preserving all user-defined metadata. The source blobs are private, and access must be granted using a Shared Access Signature (SAS) token.
Which of the following actions are required to complete this copy operation successfully? (Select TWO)
Select all that apply
You are designing a V4 Azure Function App that processes messages from an Azure Queue Storage queue. The Function App is hosted on a Consumption plan.
You have the following requirements:
1. Prevent a single Function App instance from processing more than messages concurrently to avoid memory exhaustion.
2. Prevent the Function App from scaling out to more than instances to avoid overloading a downstream database.
Which of the following configuration actions must you perform? (Select TWO)
Select all that apply
You are troubleshooting a performance issue with a Kusto Query Language (KQL) query used to retrieve telemetry from Application Insights. The query currently looks like this:
kql
requests
| where success == false
| summarize count() by bin(timestamp, 1h)
The query is taking a long time to run and occasionally exceeds resource limits because it scans all historical data.
Which of the following changes should you make to the query to improve performance and prevent resource limit issues?
You are developing a multi-tenant SaaS application that will be distributed to various corporate clients. The application requires access to the Microsoft Graph API.
You have the following requirements:
1. Users from any Microsoft Entra ID tenant must be able to sign in to the application.
2. Personal Microsoft accounts (such as Skype, Outlook.com, or Xbox Live) must be prevented from signing in.
3. A tenant administrator must be able to grant consent to the application's required permissions for all users in their tenant.
You need to configure the application registration and endpoints.
Which two actions should you perform? (Each correct answer presents part of the solution.)
Select all that apply
You are configuring a multi-tenant web application in Microsoft Entra ID. The application must allow users with work or school accounts from any organization's tenant to log in, but must exclude personal Microsoft accounts. Which two configurations are required to meet these requirements? Select two.
Select all that apply
You are developing a containerized background service that will be deployed to Azure Container Instances (ACI). The service must retrieve messages from an Azure Queue Storage queue, process the data, and write output files to an Azure Blob Storage container. You need to configure security and handle message payloads that may occasionally exceed 64 KB. Which configuration should you implement to meet these requirements securely while ensuring operational reliability?
A company is developing a C# daemon application that runs on an on-premises server. The application must connect to Microsoft Graph to read directory data without any user intervention.
Which two configuration steps must you perform to enable authentication for this daemon application? Select two.
Select all that apply
You host a file compression utility named ZipArchiver on an Azure App Service Web App. The web app currently runs on a Basic (B2) App Service plan. During daytime operations, CPU utilization frequently spikes to 85%, causing request queues to build up. You need to configure the Web App to automatically scale out when CPU utilization exceeds 80% for more than 10 minutes, and scale in when CPU utilization drops below 40%.
What should you do first?
You are developing an ASP.NET Core web application that will be hosted on an Azure App Service. The application must securely read blobs from an Azure Storage container. You decide to use a user-assigned managed identity to handle authentication.
Which sequence of steps should you perform to provision, configure, and utilize the user-assigned managed identity to access the storage container?
Drag items to arrange them in the correct order
You are developing a secure Web API named InventoryAPI and registering it in Microsoft Entra ID. You need to expose two distinct permission sets for client applications that will consume this API:
1. A permission set for automated backend daemon services that run without user interaction.
2. A permission set for user-facing client applications where permissions are delegated on behalf of the signed-in user.
You need to configure the application registration manifest for InventoryAPI to support these requirements.
Which configuration should you implement in the manifest?
You are developing a C# .NET 8 application hosted on an Azure App Service. The application must access both an Azure Key Vault and an Azure SQL Database.
You have the following security and lifecycle requirements:
- The credentials used to access the Key Vault must be unique to the App Service instance and must be automatically deleted if the App Service is deleted.
- The credentials used to access the SQL Database must be shared with another App Service instance in a different region and must persist even if the primary App Service is deleted.
To meet these requirements, you enable a system-assigned managed identity on the App Service and grant it access to the Key Vault. You also create a user-assigned managed identity, assign it to the App Service, and grant it access to the SQL Database.
In your application code, you instantiate the clients using the parameterless DefaultAzureCredential constructor from the Azure.Identity library. During testing, the application successfully retrieves secrets from the Key Vault, but attempts to connect to the SQL Database fail with an access denied error.
Which modification must you make to resolve the SQL Database connection failure?
You are developing a C# console application that processes IoT telemetry using the Azure Cosmos DB .NET SDK v3.
The application must connect to a database named `TelemetryDb` and a container named `DeviceData`. The container's partition key path is set to `/deviceId`.
You need to write code to retrieve a single telemetry reading document with an ID of `device-reading-101` and a partition key value of `device-id-55`.
Arrange the following steps in the correct order to configure the SDK, execute the point read operation, and retrieve the deserialized telemetry data.
Drag items to arrange them in the correct order
A developer is configuring security for an Azure App Service instance. They need to understand how managed identities behave when the App Service is deleted or updated. Which of the following statements correctly describe the characteristics of a system-assigned managed identity? (Select TWO).
Select all that apply
You are configuring a custom Webhook endpoint to receive events from Azure Event Grid. During the creation of the event subscription, Azure Event Grid sends a subscription validation request to your endpoint. To successfully complete the validation handshake under the default Event Grid event schema, which property from the event payload data object must your endpoint return in the validation response body?
An organization deploys an Azure Content Delivery Network (CDN) endpoint to deliver static images for a web application. The application frequently appends version query strings to image URLs (e.g., `image.png?v=1.1` and `image.png?v=1.2`) to force updates. However, the CDN currently serves stale images by returning the cached version of `image.png` for all versioned requests.
Which query string caching setting should you configure on the Azure CDN endpoint to ensure that each unique version query string is cached and served as a separate asset?
A development team is troubleshooting intermittent database connectivity errors in an Azure Web App. You need to write a Kusto Query Language (KQL) query in Application Insights to correlate failed dependency calls with exceptions. The query must return the target of the failed dependency, the associated exception details, and the operation ID. To prevent query timeouts on high-volume production logs, the query must be optimized to scan the minimum amount of data possible within the last 24 hours.
Which KQL query should you use?
| where timestamp > ago(24h) and success == false
| join kind=inner (
exceptions
| where timestamp > ago(24h)
) on operation_Id
| project timestamp, operation_Id, target, outerMessage
| join kind=inner (
exceptions
) on operation_Id
| where timestamp > ago(24h) and success == false
| project timestamp, operation_Id, target, outerMessage
| where timestamp > ago(24h) and success == false
| join kind=inner (exceptions) on operation_Id
| project timestamp, operation_Id, target, outerMessage
| where success == false
| join kind=inner (
exceptions
) on operation_Id
| project timestamp, operation_Id, target, outerMessage
You are configuring caching rules for an Azure CDN Standard from Microsoft endpoint. The origin server hosts a web application with the following requirements:
* JSON configuration files located in the `/config/` directory must be cached on the CDN for exactly 2 hours, regardless of any `Cache-Control` headers returned by the origin server.
* Media files located in the `/media/` directory must honor the `Cache-Control` header set by the origin server. If the origin server does not return a `Cache-Control` header, the CDN must cache these files for 5 days.
* For all requests to the endpoint, any query string parameters must be ignored by the CDN, and the same cached asset must be served to all users.
Which configuration should you apply to the CDN endpoint?
An Azure App Service web application experiences performance degradation due to slow external HTTP dependency calls. You need to write a Kusto Query Language (KQL) query in Application Insights to identify the top three external dependencies that failed in the last 24 hours, sorted by their average duration, along with the total count of failures for each dependency. The query must be optimized for performance and scan the minimum amount of data.
Which KQL query should you use?
| where success == false
| summarize AvgDuration = avg(duration), FailureCount = count() by name
| top 3 by AvgDuration desc
| where success == false
| summarize AvgDuration = avg(duration), FailureCount = count() by name
| top 3 by AvgDuration desc
| where timestamp > ago(24h) and success == false
| summarize AvgDuration = avg(duration), FailureCount = count() by name
| top 3 by AvgDuration desc
| where success == false
| summarize AvgDuration = avg(duration), FailureCount = count() by name
| top 3 by AvgDuration desc
| where timestamp > ago(24h)
An organization is implementing a cloud-based event-driven architecture using Azure Event Grid. You are tasked with creating an event subscription for a custom Event Grid topic that forwards events to an external, third-party REST API via a Webhook.
The architecture has the following constraints and requirements:
1. Endpoint Validation: The third-party API processes incoming requests asynchronously. Upon receiving a request, it immediately returns an HTTP status code of 202 Accepted and does not support returning a JSON response body synchronously.
2. Dead-Lettering: Any events that fail to deliver must be stored in a secure Azure Blob Storage container named 'deadletters'. You must avoid storing any static credentials or SAS tokens in the subscription configuration.
Which of the following configuration strategies should you implement to satisfy these requirements?