HOTSPOT (Drag and Drop is not supported)You have an Azure subscription that includes a resource group that contains multiple storage accounts.You assign Azure Policy definitions to the resource group.You need to recommend a solution to meet the following requirements:● Trigger on-demand Azure Policy compliance scans.● Raise Azure Monitor non-compliance alerts by querying logs collected by Log Analytics.What should you recommend for each requirement? To answer, select the appropriate options in the answer area.Note: Each correct selection is worth one point.Hot Area:
Answer(s): A
The Azure Command-Line Interface (CLI)Azure activity logsAzure CLI supports on-demand policy evaluation through az policy state trigger-scan --resource-group <resource-group-name>, which initiates a compliance scan for the specified resource group.Configure diagnostic settings on the subscription’s Azure activity logs to send the Policy category to a Log Analytics workspace. Azure Monitor log search alerts can then query the AzureActivity table for non-compliance events recorded when resources are created or updated.
https://learn.microsoft.com/en-us/azure/governance/policy/how-to/get-compliance-data
HOTSPOT (Drag and Drop is not supported)You plan to deploy Azure Databricks to support a machine learning application. Data engineers will mount an Azure Data Lake Storage account to the Databricks file system. Permissions to folders are granted directly to the data engineers.You need to recommend a design for the planned Databricks deployment. The solution must meet the following requirements:-Ensure that the data engineers can only access folders to which they have permissions.-Minimize development effort.-Minimize costs.What should you include in the recommendation? To answer, select the appropriate options in the answer area.Note: Each correct selection is worth one point.Hot Area:
Box 1: PremiumPremium Databricks SKU is required for credential passhtrough.Box 2: Credential passthroughAthenticate automatically to Azure Data Lake Storage Gen1 (ADLS Gen1) and Azure Data Lake Storage Gen2 (ADLS Gen2) from Azure Databricks clusters using the same Microsoft Entra identity that you use to log into Azure Databricks. When you enable Azure Data Lake Storage credential passthrough for your cluster, commands that you run on that cluster can read and write data in Azure Data Lake Storage without requiring you to configure service principal credentials for access to storage.
https://docs.microsoft.com/en-us/azure/databricks/security/credential-passthrough/adls-passthrough
You are designing a large Azure environment that will contain many subscriptions.You plan to use Azure Policy as part of a governance solution.To which three scopes can you assign Azure Policy definitions? Each correct answer presents a complete solution.Note: Each correct selection is worth one point.
Answer(s): C,E,F
Azure Policy evaluates resources in Azure by comparing the properties of those resources to business rules. Once your business rules have been formed, the policy definition or initiative is assigned to any scope of resources that Azure supports, such as management groups, subscriptions, resource groups, or individual resources.
https://docs.microsoft.com/en-us/azure/governance/policy/overview
HOTSPOT (Drag and Drop is not supported)You have an Azure subscription that contains an Azure key vault named KV1 and a virtual machine named VM1. VM1 runs Windows Server Azure Edition.You plan to deploy an ASP.Net Core-based application named App1 to VM1.You need to configure App1 to use a system-assigned managed identity to retrieve secrets from KV1. The solution must minimize development effort.What should you do? To answer, select the appropriate options in the answer area.Note: Each correct selection is worth one point.Hot Area:
Box 1: Client Credentials flowClient Credentials flow — The only flow that does not require immediate user interaction, usually used when the OAuth client is acting on-behalf of itself, when user-consent doesn’t make sense, or when authorization primitives could be configured out-of-band (for instance via Microsoft Entra ID)Note: Authenticating to Azure ServicesLocal machines don't support managed identities for Azure resources. As a result, the Microsoft.Azure.Services.AppAuthentication library uses your developer credentials to run in your local development environment. When the solution is deployed to Azure, the library uses a managed identity to switch to an OAuth 2.0 client credential grant flow. This approach means you can test the same code locally and remotely without worry.Incorrect:* Authorization code flow — Requires user interaction and consent, typically via the web browser, to get a code which is then used to issue an access token.* Implicit grant flow — Created for single page web / mobile webview apps, where token creation and handling is done entirely from the front end.Box 2: OAuth 2.0 access token endpoint of Microsoft Entra IDExample: Issuing & inspecting our first OAuth tokenAt this stage, we should be able to issue tokens to Service A, on behalf of Service B — let’s see that in action.1. In Microsoft Entra application registration blade, go to Service B (as shown in previous steps)2. In the Overview blade, Click on the ‘Endpoints’ button at the command bar3. In the opened Endpoints blade, copy the OAuth 2.0 token endpoint (v2) URL4. Issue a HTTP POST call for the given URL with the following parameters$> curl -s -XPOST <token-v2-endpoint> \-d grant_type=client_credentials \-d client_id=<service-b-app-id> \-d client_secret=<service-b-client-secret> \-d scope=<service-a-application-id-uri>/.default5. Etc.
https://medium.com/@dany74q/service-to-service-auth-with-azure-ad-msi-oauth-2-0-step-by-step-a1aed196b1 e1https://learn.microsoft.com/en-us/dotnet/api/overview/azure/service-to-service-authentication
HOTSPOT (Drag and Drop is not supported)You need to design an Azure policy that will implement the following functionality:-For new resources, assign tags and values that match the tags and values of the resource group to which the resources are deployed.-For existing resources, identify whether the tags and values match the tags and values of the resource group that contains the resources.-For any non-compliant resources, trigger auto-generated remediation tasks to create missing tags and values.The solution must use the principle of least privilege.What should you include in the design? To answer, select the appropriate options in the answer area.Note: Each correct selection is worth one point.Hot Area:
Box 1: ModifyModify is used to add, update, or remove properties or tags on a subscription or resource during creation or update. A common example is updating tags on resources such as costCenter. Existing non-compliant resources can be remediated with a remediation task. A single Modify rule can have any number of operations. Policy assignments with effect set as Modify require a managed identity to do remediation.Incorrect:* The following effects are deprecated: EnforceOPAConstraint EnforceRegoPolicy* Append is used to add additional fields to the requested resource during creation or update. A common example is specifying allowed IPs for a storage resource.Append is intended for use with non-tag properties. While Append can add tags to a resource during a create or update request, it's recommended to use the Modify effect for tags instead.Box 2: A managed identity with the Contributor roleThe managed identity needs to be granted the appropriate roles required for remediating resources to grant the managed identity.Contributor - Can create and manage all types of Azure resources but can't grant access to others.Incorrect:User Access Administrator: lets you manage user access to Azure resources.
https://docs.microsoft.com/en-us/azure/governance/policy/concepts/effects https://docs.microsoft.com/en-us/azure/governance/policy/how-to/remediate-resources https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles
Post your Comments and Discuss Microsoft AZ-305 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the AZ-305 content, but please register or login to continue.