← All guides

Identity & authorization

Design Conditional Access around AI identity types

Separate human, service-principal, managed-identity, and preview agent policy boundaries; validate token acquisition and resource enforcement independently.

Conditional Accessworkload identitiesauthenticationEntra IDtoken revocation
User, workload and resource authorization are distinct control paths.
Verify policy support for the actual identity type; resource permissions remain a separate decision.View full-size diagram

An AI application can use four different identity paths during one conversation: a person signs in, an API exchanges a delegated token, a worker authenticates without a person, and a managed identity reaches storage. A successful Conditional Access test on the first path does not establish protection on the others. This guide develops a policy and validation design; it does not report testing in a tenant.

Define the enforcement boundary first

Create a request map containing the initiating principal, client application, token audience, authentication flow, resource provider, and final business action. Include scheduled jobs and recovery processes. Record the actual enterprise application object ID separately from the application/client ID. A policy assigned to the wrong object can look complete in a spreadsheet while missing the running service.

For user policies, Conditional Access combines identity, device, location, and other signals. User Conditional Access requires Entra ID P1; user/sign-in risk controls require P2, and related products can add licensing requirements. It is evaluated after first-factor authentication and is not an internet denial-of-service control. Policy and licensing overview.

Our recommended policy register has one row per enforcement boundary, not one row per product name. “Copilot is covered” is insufficient if an associated export worker holds an unrelated application credential.

Identity path Relevant boundary Separate evidence to collect
Human using an AI application User policy for the actual target resource Applied policy result and allowed/denied sign-in
Application calling without a user Eligible service-principal workload policy Direct object assignment and token-request result
Managed identity Resource permissions, network boundary, lifecycle Effective role scope and denied resource operation
Entra agent identity Agent-specific preview capabilities Tenant availability and supported assignment model

Agent-specific assignments are documented as preview. Do not treat an existing enterprise application with “agent” in its display name as automatically belonging to this model. Assignment types.

Constrain the service-principal path correctly

Workload Conditional Access applies to supported single-tenant service principals registered in the organization. Managed identities, Microsoft applications, and third-party multitenant SaaS applications are outside this policy coverage. Assign the service principal directly; membership in a targeted group does not cause the policy to apply to it. Creating or changing these policies requires Workload Identities Premium licensing. The grant control is blocking, including policies based on location or service-principal risk. Workload policy contract.

Start with a documented egress inventory before introducing an IP restriction. Capture normal application hosts, deployment runners, regional failover, and operator recovery paths. A stable NAT address can support a location policy, but sharing that address does not make every process behind it trusted. Keep audience validation, least privilege, and resource-side authorization in the design.

Use report-only evaluation with representative traffic, then stage enforcement on a small set of directly assigned service principals. For each excluded principal, record an owner, reason, expiry, and compensating boundary. Do not recover a failed rollout by creating a broad permanent exclusion that silently becomes the normal configuration.

Separate new tokens from existing access

A blocked token request and an already-issued access token are different test cases. Workload continuous access evaluation has a narrow documented scope: supported single-tenant service principals, Microsoft Graph as the resource provider, and clients that declare the required capability and handle claims challenges. Managed identities are excluded. Do not promise the same revocation timing for every Azure data service. Workload CAE prerequisites and limits.

For incident planning, build a resource-specific containment sequence: stop new token issuance where supported, remove excessive authorization, disable the application path, and confirm rejection at the destination. Measure the interval instead of assuming a policy toggle erases every credential cache. Preserve timestamps for the administrative change, first blocked token request, and last successful resource action.

Test failure cases without confusing the signals

Use isolated test principals and synthetic data. Hold the target resource and action constant while changing one condition. A network timeout cannot demonstrate Conditional Access enforcement, and an application error page cannot identify which policy denied access.

Test Required evidence
Approved user/device and intended resource Expected sign-in and legitimate action succeed
Disallowed user condition Policy failure identified in the sign-in record
Service principal from disallowed location Fresh token request is blocked by the intended workload policy
Same principal assigned only through a group Negative test exposes the unsupported assignment assumption
Managed identity accessing an unrelated container Resource authorization denies access independently of user CA
Existing token after a policy change Measured provider-specific behavior, including any continued access
Recovery process and regional failover Approved continuity path works without weakening the broad policy

Keep the correlation ID, directory/object IDs, target resource, and policy result; avoid copying bearer tokens into tickets. A policy coverage dashboard is useful inventory evidence but does not replace these end-to-end tests. Revisit the map whenever an SDK changes token flow, a background worker is added, or a new connector gains application permissions. Continue with delegated authorization and workload federation boundaries for the controls Conditional Access does not supply.

Go to the source

References & further reading

  1. Microsoft Learn — Conditional Access overview and licensing
  2. Microsoft Learn — Conditional Access for workload identities
  3. Microsoft Learn — Users, agents, and workload identity assignments
  4. Microsoft Learn — Continuous access evaluation for workload identities