The interview problem

Practice prompt

A customer wants an AI assistant to search two document repositories. Their source systems use different user IDs, nested groups and document permissions. Employees move between departments, and some documents are shared with external guests. As the FDE, define a permission mapping, demonstrate revocation behavior and produce evidence the customer can approve before rollout.

Original FDE practice, not a reported company interview. Identities, documents and timings are hypothetical. Official Microsoft technical references retrieved September 27, 2026.

1. Document the source's actual access decision

Do not begin by copying a list of group names into the index. Ask the source owners how effective read permission is determined: direct grants, inherited grants, nested groups, guest membership, explicit denials, link-based access, disabled accounts and document-specific restrictions. Record which mechanisms each connector can faithfully represent.

A connector's service account may read many documents for indexing. That authority is not the employee's authority to retrieve them. Similarly, permission to read a source document does not automatically authorize sending its contents to a separate model provider. Confirm the approved processing boundary independently of the user's source access.

Write the target rule: for the supported permission subset, a query may use a document only when the authenticated caller currently has source-equivalent read access within the agreed freshness contract. Unsupported or ambiguous rules cause exclusion and an actionable diagnostic. Do not silently simplify a source policy into a broader allow list.

2. Use stable, scoped identities

Map an authenticated application subject to source-native immutable IDs through an approved identity directory. Scope every identifier by customer and source. An email address can change or be reassigned; a display name is not a reliable identity key. Group “Engineering” in tenant A must not match an identically named group in tenant B.

For each mapping, retain its source, verification status and revision. A missing mapping means no access through that source until resolved. Guest accounts require their own mapped principal, not an assumption that an email domain grants employee access. Disable stale mappings when accounts are deactivated or replaced.

Resolve nested membership using the source's semantics, including cycle handling and any limits on transitive expansion. If a token contains only a partial group list, treat it as incomplete evidence and use a supported lookup path. Never let the browser supply an arbitrary list of groups that the server trusts as authorization.

3. Work a permission truth table

For a deliberately simplified pilot, the supported source semantics are: a user may read a document if there is a direct or transitive-group allow, unless a direct user deny exists. This is an exercise-specific rule, not a claim about every repository.

Alice belongs to group Engineers; Engineers is nested in Product. Bob belongs to Sales. Guest G has no employee groups. Document D1 allows Engineers. D2 allows Product but directly denies Alice. D3 directly allows Guest G. D4 has no supported grant.

CallerD1D2D3D4
AliceAllowDeny: explicit deny winsDenyDeny
BobDenyDenyDenyDeny
Guest GDenyDenyAllowDeny

Removing Alice from Engineers must remove her derived Product membership as well, unless another independent membership path remains. An implementation that only deletes the direct Engineers entry while retaining a cached transitive Product grant is incorrect. Verify multiple membership paths rather than deleting all access whenever any one path disappears.

If the real source's rule differs—for example, a separate role grant has precedence—the mapping must change. The source owner should validate the truth table using native access checks. A generic “deny always wins” slogan is not a substitute for preserving the actual source policy.

4. Enforce permissions before exposing evidence

source documents + effective permission metadata → versioned ingestion
identity directory + membership changes          → authorization service
                                                        ↓
caller → authenticated query gateway → filtered retrieval
                                      ↓
                          current authorization check
                                      ↓
                         approved reranker / model → answer

Index source ID, document ID, revision and permission metadata with every derived chunk. Inherit the document's restrictions into tables, summaries and attachments according to their actual source rules. A generated summary combining several documents must not acquire the union of their audiences. Conservatively retain every input source as a dependency and require access to all of them unless a separately validated redaction process establishes a narrower dependency set; model-generated citations alone are not a reliable disclosure inventory.

Filter retrieval using server-derived identity context, then verify current access before returning snippets or passing content to a model. A final filter on citations is too late if unauthorized text already entered a generated answer. Avoid leaking restricted titles, result counts, facets or snippets through alternative endpoints.

Microsoft distinguishes service-level search roles from document-level access. Its security-filter pattern relies on application-supplied identity filters; correct identity derivation and enforcement remain part of the integration. Validate every query path, including debug tools, suggestions and exports, rather than assuming one filtered search endpoint protects the whole application.

5. Trace a revocation through every cache

Suppose group synchronization runs every five minutes. Alice is removed immediately after a poll. The next poll sees the change five minutes later, and an authorization cache can retain the preceding membership response for another two minutes if it was refreshed just before that poll. Without invalidation, stale permission can persist for almost seven minutes under these assumptions. This is a nominal bound only if polling, processing and cache expiration all meet their stated limits.

Polling a document ACL every five minutes independently adds another stale-data path. Taking the maximum of separate stale paths is valid only when they run independently from authoritative state; serial caches can add delay. Draw the actual dependency chain and measure the worst tested path instead of advertising a single cache TTL as the revocation guarantee.

If the customer requires revocation within one minute, this design fails. Options include reliable change events with cache invalidation, shorter verified refresh intervals, or an authoritative query-time access check with an agreed failure policy. Do not claim zero revocation delay from an eventually consistent feed. When permission freshness cannot be established, fail closed for affected restricted content and explain the temporary limitation.

Define the authorization boundary for in-flight answers as well. A check before generation can become stale while generation runs. Revalidate before releasing buffered output, or enforce an agreed short authorization interval during streaming; stop further release when access is revoked or freshness cannot be established. Already transmitted bytes cannot be recalled.

Cache answers with their source dependencies and permission context, and revalidate those dependencies before reuse. A shared cache keyed only by question can leak an answer generated for another audience. Previously displayed information cannot be recalled from a user's memory; the contract concerns future retrieval and reuse, with separately defined handling of saved conversation history.

6. Turn the contract into an acceptance matrix

For 12 test identities, 20 documents and four entry points—search, generated answer, citation preview and answer cache—there are 12×20×4=960 base checks. Repeat the relevant cases before and after removal, addition, account disablement, document movement and permission inheritance changes. The count describes coverage of this matrix, not proof against all possible authorization failures.

Include negative cases: a user from another tenant with the same display name, a recycled email, a guest without groups, an incomplete membership response, an unavailable directory and a stale cached answer. Use synthetic documents containing distinct canary strings so unauthorized content can be detected without exposing real confidential material in test logs.

Test both false allows and false denials. An empty result is not enough evidence: confirm whether the document was correctly denied, absent from indexing, or missed by retrieval. For allowed documents, use direct IDs or deterministic queries to verify permission behavior independently of semantic relevance.

Measure elapsed revocation time from the authoritative source event to the last permitted use in each application path. Record clocks, event IDs, permission versions and query decisions. Run a deliberate missed-event exercise and verify that periodic reconciliation repairs it. A successful happy-path demo does not establish revocation reliability.

7. Agree scope and operating ownership

Deliver a mapping specification listing supported source mechanisms, excluded content, identity resolution, refresh guarantees and failure behavior. Include the validated truth table, test matrix, revocation measurements and unresolved exceptions. The customer source owner validates semantics; security approves the processing boundary; the application owner owns enforcement; operations owns synchronization and incident response.

Start with a narrow collection whose permissions can be represented faithfully. Keep unsupported shared-link or inherited-policy cases quarantined until resolved. Exclusion must be visible to administrators so they understand incomplete coverage; it should not expose restricted document names to unauthorized end users.

Monitor stale permission age, mapping failures, denied queries, missed-change reconciliation and access discrepancies reported by users. A discrepancy triggers investigation of source state, identity mapping and derived content, with affected retrieval disabled when necessary. Preserve enough audit evidence to reconstruct the decision without broadly logging document bodies or credentials.

8. Follow-ups and self-review

Follow-ups: Does a successful SSO login grant document access? No. Can connector permissions be reused as user permissions? No. Does hiding a citation remove leaked answer text? No. Can a two-minute cache prove two-minute revocation? Not if its source is already stale. Should unsupported permissions default to public? No; exclude them and resolve the mapping.

Score 0–2 each for source-equivalent semantics, stable scoped identity mapping, authorization before model exposure, measured revocation across caches, and customer-owned acceptance evidence. Full marks require a clear supported scope and honest freshness guarantees.

Sources and next steps

The permission model, truth table, timing example and acceptance plan are original. Continue with customer data readiness for evaluating the wider integration scope.

Continue your preparation

Choose a connected learning path or browse more FDE interviews questions. Read our editorial method and attribution policy.