NEW
Font size
WorksheetsAZ204(Implement Security + Monitor and troubleshoot AZsolutions)
Total questions: 65
Worksheet time: 33mins
You are developing a web application hosted on Azure App Service. It must scale out automatically based on CPU usage.
Solution: Configure autoscale settings in Azure App Service.
Does the solution meet the goal?
Yes
No
Which of the following is the correct way to securely store and retrieve secrets in an Azure Function app?
A. Store secrets in application settings
B. Use Azure Key Vault with Managed Identity
C. Store secrets in a local JSON file
D. Use environment variables
You are building a backend service that needs to access Azure Blob Storage. You decide to use a connection string stored in code.
Solution: Store the connection string in the source code and deploy it with the application.
Does the solution meet the goal?
Yes
No
Which Azure service allows you to manage feature flags and app settings centrally?
A. Azure Monitor
B. Azure App Configuration
C. Azure Key Vault
D. Azure Policy
You are developing an Azure Function that needs to access a secret stored in Azure Key Vault. You configure a system-assigned managed identity for the function and grant it access to the Key Vault.
Solution: Use the Azure SDK to authenticate with the managed identity and retrieve the secret.
Does the solution meet the goal?
Yes
No
What is the purpose of a Shared Access Signature (SAS) in Azure Storage?
A. To encrypt data at rest
B. To provide time-limited access to storage resources
C. To monitor storage usage
D. To manage storage account keys
You are developing a web app that needs to access Azure Blob Storage. You decide to use a user-assigned managed identity and assign it to the app. However, you forget to grant the identity access to the storage account.
Solution: The app will still be able to access the storage account using the managed identity.
Does the solution meet the goal?
Yes
No
Which Microsoft service allows you to programmatically access user data in Microsoft 365, such as emails and calendars?
A. Azure Monitor
B. Microsoft Graph
C. Azure AD B2C
D. Azure Logic Apps
You are developing a service that needs to authenticate users using Microsoft Entra ID. You register the app in Entra ID and configure OAuth 2.0 authentication.
Solution: Use the Microsoft Authentication Library (MSAL) to acquire tokens.
Does the solution meet the goal?
Yes
No
Which of the following is NOT a valid use case for Azure Managed Identities?
A. Accessing Azure Key Vault
B. Authenticating users in a web app
C. Accessing Azure SQL Database
D. Accessing Azure Storage
You are developing a background service that needs to access Microsoft Graph to read user profiles. You configure the app with delegated permissions.
Solution: The service will be able to access user profiles without a signed-in user.
Does the solution meet the goal?
Yes
No
Which of the following is required to use a system-assigned managed identity?
A. Register the app in Microsoft Entra ID
B. Enable the identity on the Azure resource
C. Create a service principal manually
D. Store credentials in Azure Key Vault
You are developing an app that needs to securely store configuration values. You decide to use Azure App Configuration.
Solution: Store the values in App Configuration and access them using the Azure SDK.
Does the solution meet the goal?
Yes
No
Which of the following is a benefit of using Azure Key Vault?
A. It provides real-time analytics
B. It provides automatic scaling of web apps
C. It allows secure storage of secrets, keys, and certificates
D. It manages user identities
You are developing a web app that needs to access Azure Storage. You decide to use a Shared Access Signature (SAS) that never expires.
Solution: This approach ensures long-term secure access.
Does the solution meet the goal?
Yes
No
You are developing a microservice that needs to access Azure SQL Database. You enable a system-assigned managed identity on the service and grant it the "SQL DB Contributor" role.
Solution: The microservice will be able to connect to the database using Azure AD authentication.
Does the solution meet the goal?
Yes
No
Which of the following permissions is required for an app to read user profile data using Microsoft Graph with application permissions?
You are developing a web app that needs to access Azure Key Vault. You configure a user-assigned managed identity but forget to assign it to the app.
Solution: The app will still be able to access Key Vault using the default credentials.
Does the solution meet the goal?
Yes
No
You are building a service that needs to access Azure Storage for a limited time. You generate a SAS token with read-only permissions and a 1-hour expiry.
Solution: Use the SAS token in the service to access the storage.
Does the solution meet the goal?
Yes
No
Which of the following is a valid reason to use Azure App Configuration over Azure Key Vault?
A. To store connection strings
B. To store certificates
C. To manage feature flags
D. To store secrets securely
You are developing a background job that needs to access Microsoft Graph. You configure delegated permissions in Entra ID.
Solution: The job will be able to access Microsoft Graph without user interaction.
Does the solution meet the goal?
Yes
No
You are developing a web API that needs to authenticate users via Microsoft Entra ID. You configure the app registration and enable OAuth 2.0 authorization code flow.
Solution: Use MSAL to acquire tokens and validate them in the API.
Does the solution meet the goal?
Yes
No
You are developing a service that needs to access Azure Key Vault. You decide to use a connection string stored in a configuration file.
Solution: This is a secure and scalable approach.
Does the solution meet the goal?
Yes
No
You are developing a web app that needs to access Azure Blob Storage. You configure a user-assigned managed identity and assign it the "Storage Blob Data Contributor" role.
Solution: Use the Azure SDK to authenticate using the managed identity.
Does the solution meet the goal?
Yes
No
You are developing a mobile app that needs to authenticate users. You decide to use Azure AD B2C but configure it with Microsoft Entra ID instead.
Solution: This setup will allow external users to sign in with social accounts.
Does the solution meet the goal?
Yes
No
Which of the following is the correct way to grant an Azure Function access to Azure Key Vault using a system-assigned managed identity?
A. Add the identity to the Key Vault access policy
B. Store the Key Vault credentials in app settings
C. Use a SAS token
D. Add the identity to the Azure AD group
Which Azure service allows you to centrally manage and distribute certificates, secrets, and encryption keys?
A. Azure App Configuration
B. Azure Key Vault
C. Azure Monitor
D. Azure Policy
Which Azure service allows you to authenticate and authorize users in a multi-tenant application?
A. Azure AD B2C
B. Microsoft Entra ID
C. Azure Key Vault
D. Azure App Configuration
What is the primary benefit of using application permissions in Microsoft Graph?
A. They require user consent
B. They allow background services to access data without a signed-in user
C. They are limited to read-only access
D. They are used only for mobile apps
Which of the following is required to access Azure Key Vault from an Azure App Service using a managed identity?
A. Enable diagnostics logging
B. Assign the identity to a resource group
C. Grant the identity access to the Key Vault
D. Use a connection string in app settings
Which Microsoft Identity platform flow is best suited for single-page applications (SPAs)?
A. Client credentials flow
B. Authorization code flow with PKCE
C. Resource owner password credentials flow
D. Device code flow
What is the purpose of the DefaultAzureCredential class in the Azure SDK?
A. To create new Azure resources
B. To manage Azure subscriptions
C. To simplify authentication by chaining multiple credential types
D. To encrypt data in transit
Which of the following is a valid reason to use a user-assigned managed identity over a system-assigned one?
A. It is automatically deleted with the resource
B. It can be shared across multiple resources
C. It requires fewer permissions
D. It is cheaper to use
Which of the following is true about Azure Key Vault access policies and RBAC?
A. You must use both at the same time
B. RBAC is required for all secrets
C. You can use either access policies or RBAC, but not both simultaneously
D. Access policies are only for certificates
You are developing an Azure-hosted application that needs to access Azure Storage securely without managing credentials. Which approach should you use?
A. Use a connection string stored in app settings
B. Use a Shared Access Signature (SAS) with no expiration
C. Use a managed identity and assign it the appropriate role
D. Use a hardcoded storage account key in the application code
Which of the following is required to enable distributed tracing in Application Insights?
A. A virtual machine
B. A correlation ID
C. A managed identity
D. A service principal
You want to be notified when your application throws more than 10 exceptions in a 5-minute window.
Solution: Create an alert rule in Application Insights based on the exception count metric.
Does the solution meet the goal?
Yes
No
Which of the following can be used to create custom dashboards for telemetry data in Azure?
A. Azure Boards
B. Azure Dashboards
C. Azure DevTest Labs
D. Azure Repos
You want to monitor the number of database timeouts in your application. You decide to use Azure Monitor metrics.
Solution: Use Azure Monitor metrics to track SQL timeouts.
Does the solution meet the goal?
Yes
No
Which of the following is NOT a valid alert signal source in Azure Monitor?
A. Application Insights
B. Azure Metrics
C. Azure DevOps
D. Log Analytics
You are developing a multi-tier application. You want to trace a request from the frontend to the backend services.
Solution: Use Application Insights with distributed tracing enabled.
Does the solution meet the goal?
Yes
No
What is the purpose of correlation IDs in Application Insights?
A. To identify the user’s IP address
B. To track the same request across multiple services
C. To encrypt telemetry data
D. To group logs by severity
You want to monitor the number of users currently using your application. You decide to use Azure Monitor metrics.
Solution: Use Azure Monitor metrics to track active users.
Does the solution meet the goal?
Yes
No
Which of the following Application Insights features allows you to view telemetry in near real-time?
A. Smart Detection
B. Live Metrics Stream
C. Metrics Explorer
D. Log Analytics
You are developing a web application that experiences intermittent slow response times. You want to identify the root cause.
Solution: Use Application Insights to analyze request and dependency telemetry.
Does the solution meet the goal?
Yes
No
Which of the following is required to enable Application Insights in an Azure Function app?
A. A dedicated App Service Plan
B. A connection string or instrumentation key
C. A virtual network
D. A managed identity
You want to monitor the performance of a background job running in Azure App Service.
Solution: Use Application Insights to track custom events and dependencies.
Does the solution meet the goal?
Yes
No
Which of the following can trigger an alert in Application Insights?
A. A spike in failed requests
B. A drop in server response time
C. A custom event
D. All of the above
You want to monitor your app’s memory usage using Application Insights.
Solution: Use Application Insights metrics to track memory usage.
Does the solution meet the goal?
Yes
No
What is the primary benefit of using distributed tracing in Application Insights?
A. Reduces app latency
B. Tracks user sessions
C. Correlates telemetry across services
D. Improves UI responsiveness
You want to monitor the live performance of your app, including request rates and failure rates.
Solution: Use the Live Metrics Stream in Application Insights.
Does the solution meet the goal?
Yes
No
Which of the following is NOT a telemetry type collected by default in Application Insights?
A. Requests
B. Exceptions
C. Custom Events
D. Page Views
You want to monitor the number of failed login attempts in your application.
Solution: Track custom events in Application Insights for each failed login.
Does the solution meet the goal?
Yes
No
Which of the following features in Application Insights helps detect performance anomalies automatically?
A. Live Metrics
B. Smart Detection
C. Metrics Explorer
D. Log Analytics
You are developing a microservices-based application. You want to trace a request across multiple services. You decide to use Azure Monitor metrics.
Solution: Use Azure Monitor metrics to trace the request.
Does the solution meet the goal?
Yes
No
Which of the following is NOT a benefit of using Application Insights?
A. Real-time performance monitoring
B. Automatic scaling of App Services
C. Distributed tracing
D. Smart detection of anomalies
You want to be alerted when the average response time of your web app exceeds 2 seconds.
Solution: Create an alert rule in Application Insights based on the server response time metric.
Does the solution meet the goal?
Yes
No
Which tool allows you to write custom queries to analyze telemetry data collected by Application Insights?
A. Azure CLI
B. Kusto Query Language (KQL)
C. PowerShell
D. Azure Resource Graph
You are building a web app and want to monitor failed HTTP requests. You decide to use Azure Monitor metrics only.
Solution: Use Azure Monitor metrics to track failed requests.
Does the solution meet the goal?
Yes
No
Which of the following is NOT a valid way to instrument an app with Application Insights?
A. Using the Application Insights SDK
B. Enabling it from the Azure portal
C. Using Azure Monitor Logs
D. Using Azure CLI to inject telemetry
You are developing a backend API hosted in Azure App Service. You want to track dependencies such as SQL Database calls.
Solution: Use Application Insights SDK to instrument the application.
Does the solution meet the goal?
Yes
No
You want to monitor the availability of your web app from multiple geographic locations. Which Application Insights feature should you use?
A. Smart Detection
B. Live Metrics
C. Web Tests
D. Metrics Explorer
You are troubleshooting a performance issue in your Azure Function app. You decide to enable Application Insights and expect it to automatically start collecting telemetry without any code changes.
Solution: Enable Application Insights from the Azure portal without modifying the function code.
Does the solution meet the goal?
Yes
No
Which of the following telemetry types can Application Insights collect?
A. Metrics
B. Logs
C. Traces
D. All of the above
You are developing a web application hosted on Azure App Service. It must scale out automatically based on CPU usage.
Solution: Configure autoscale settings in Azure App Service.
Does the solution meet the goal?
Yes
No
