Question 28 — AZ-104 Case Study Set
Business Context
Paideffort operates an Azure-hosted certification-learning platform across multiple subscriptions. The production platform contains storage accounts, Key Vault resources, virtual networks, Azure Functions, centralized monitoring resources, and AI services. The application uses a Microsoft Foundry project endpoint for agent and project operations and an Azure OpenAI endpoint for direct model operations. Microsoft Entra ID authentication is required wherever supported. FunctionTool is used for deterministic application functions, an OpenAPI tool accesses the certification catalog, and Azure Functions execute longer-running document-processing operations.
Production resources must normally be deployed only to West Europe or North Europe. Resources with a global location and Microsoft.AzureActiveDirectory/b2cDirectories must remain outside that regional restriction. Storage accounts must have an application tag. New noncompliant resources should be blocked where appropriate, while selected governance controls should initially produce compliance information without interrupting production deployments. Central monitoring must eventually be deployed automatically for eligible resources that lack the required related configuration.
Policy Architecture
Paideffort creates custom Azure Policy definitions at the management-group level and assigns them to production subscriptions. The infrastructure team wants reusable definitions rather than separate copies for each subscription. Policy assignments can therefore supply different parameter values. Existing subscriptions already inherit a Microsoft-maintained policy that audits selected security configurations, and Paideffort intends to layer its custom controls over those assignments.
{
"displayName": "Paideffort allowed production locations",
"description": "Restricts regional production resources to approved Azure locations.",
"mode": "Indexed",
"parameters": {
"listOfAllowedLocations": {
"type": "Array",
"metadata": {
"displayName": "Allowed locations",
"strongType": "location"
}
}
},
"policyRule": {
"if": {
"anyOf": [
{
"field": "location",
"notIn": "[parameters('listOfAllowedLocations')]"
},
{
"field": "location",
"notEquals": "global"
},
{
"field": "type",
"notEquals": "Microsoft.AzureActiveDirectory/b2cDirectories"
}
]
},
"then": {
"effect": "[parameters('policyEffect')]"
}
}
}
The production assignment supplies West Europe and North Europe as allowed locations. During governance testing, the team wants the same definition to support both audit-oriented validation and enforcement without maintaining two otherwise identical policies.
Deployment and Compliance Automation
- name: Assign regional policy
run: |
az policy assignment create \
--name paideffort-prod-location \
--policy $POLICY_ID \
--params '{"listOfAllowedLocations":{"value":["westeurope","northeurope"]}}' \
--enforcement-mode Default
A second custom control evaluates storage accounts. If an account does not contain the application tag, Paideffort wants Azure Policy to add the required tag during supported resource creation or update operations instead of merely recording the resource as noncompliant. For monitoring, the platform team intends to evaluate an application resource and deploy a related diagnostic configuration when the required configuration does not exist.
from azure.identity import DefaultAzureCredential
from azure.mgmt.policyinsights import PolicyInsightsClient
credential = DefaultAzureCredential()
client = PolicyInsightsClient(credential, subscription_id)
latest_state = client.policy_states.list_query_results_for_subscription(
policy_states_resource="latest",
subscription_id=subscription_id
)
Paideffort expects more subscriptions, regional AI workloads, additional agents, and stronger governance controls. The organization wants policy definitions that can be reused through parameters, controlled rollout of new enforcement rules, automated remediation-related deployments, protection against deletion of selected shared resources, and centralized compliance reporting. Security architects also require administrators to understand the combined result when multiple independently evaluated policies target the same resource.