Inferensys

Prompt

User Permission Elevation Approval Prompt

A practical prompt playbook for generating structured, auditable user permission elevation approval requests in production IAM workflows.
Elegant overhead shot of a polished wooden communal table in a sun-drenched WeWork lounge, laptops and tablets displaying AI workflow dashboards, plants and pendant lights in background.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the exact conditions for using the privilege elevation approval prompt and its operational boundaries.

This prompt is designed for IAM and security engineering teams who are embedding AI agents into access management workflows. The core job-to-be-done is to convert a dynamic, context-rich elevation request into a standardized, blocking approval payload that a human reviewer can act on immediately. Use it when an AI agent, chatbot, or automated workflow needs to request temporary or permanent privilege escalation for a user or service account. The prompt takes structured inputs—requester identity, current role, requested role, business justification, scope, duration, and affected resources—and outputs a strict approval request object. This object acts as a non-negotiable gate: no elevation is executed by the downstream system until a human provides explicit sign-off.

The ideal user is an IAM engineer or platform developer building an internal tool where the logic of who can approve what is too nuanced for static code. Instead of hardcoding every possible elevation path, you wire this prompt into a harness that calls your identity provider's API. The prompt enforces critical safety checks that static scripts often miss. It programmatically flags segregation of duty (SoD) violations by comparing the requested role against the user's existing permissions, and it rejects requests that lack a mandatory expiration date for temporary access. This prevents the two most common IAM automation failures: granting a user a conflicting set of permissions and leaving privileged access permanently enabled. The output is not just a text block; it is a structured JSON payload with fields like approval_status, sod_violations, and required_signoffs that your application can parse to decide whether to create a ticket, send a Slack notification, or block the request entirely.

Do not use this prompt for low-risk, read-only access grants or for fully automated role-based provisioning where the policy is already codified in a rules engine. If a user simply needs read access to a public dashboard, the overhead of human review is unnecessary and this prompt will add friction without reducing risk. Similarly, if your organization uses a birthright provisioning system where roles are assigned automatically based on department and title, this prompt is the wrong tool. It is specifically for elevations above baseline, where the potential for damage—data exfiltration, system misconfiguration, financial loss—is high enough to warrant a human in the loop. Before implementing, map out your existing access policies and identify the specific elevation scenarios that require a human judgment call; deploy this prompt only at those choke points.

PRACTICAL GUARDRAILS

Use Case Fit

Where the User Permission Elevation Approval Prompt works, where it fails, and the operational preconditions required before deploying it into an IAM or security workflow.

01

Good Fit: Structured Access Requests

Use when: A user or system requests a specific role change with a defined scope, duration, and target resource. The prompt excels at normalizing the request into a structured approval payload. Guardrail: Always validate the requested role against a known role catalog before generating the approval card.

02

Bad Fit: Implicit or Ambiguous Requests

Avoid when: The request is vague ('I need more access') or requires the model to infer which permissions are needed. This prompt is for formatting a known request, not for access discovery. Guardrail: Route ambiguous requests to an 'Ambiguous Intent Clarification' prompt first; never let the model guess permissions.

03

Required Inputs

Risk: Missing fields produce an incomplete approval card, leading to rubber-stamping by approvers. Guardrail: Enforce a strict input schema requiring current_role, requested_role, justification, scope_duration, and affected_resources. Reject the prompt execution if any field is null or empty.

04

Operational Risk: Segregation of Duty (SoD) Violations

Risk: The prompt might generate an approval for a role combination that violates compliance policies (e.g., same user approving their own payments). Guardrail: Integrate a pre-generation check against a SoD conflict matrix. If a conflict is detected, block the prompt and escalate to a compliance officer.

05

Operational Risk: Permanent Privilege Creep

Risk: Approving an elevation without a hard expiration date leads to standing privileges that are never revoked. Guardrail: The prompt logic must reject any request where scope_duration is 'permanent' or missing. Force a maximum time-to-live (TTL) based on the sensitivity of the role.

06

Downstream Integration

Risk: The generated approval text is clear, but the human approver's decision isn't captured in the IAM system. Guardrail: The prompt output must include a machine-readable approval_id and a strict boolean decision field. The application layer must map this to the IAM provisioning API; the prompt alone is not the integration.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready system prompt that generates a structured permission elevation approval request with segregation-of-duty checks, scope constraints, and missing-field detection before routing to human reviewers.

The prompt below is designed to sit inside your IAM automation workflow. It receives live context from your identity provider, ticketing system, and user directory, then produces a structured approval payload that a human reviewer can act on. The prompt does not make the decision—it prepares the evidence, flags risks, and enforces completeness so the reviewer can decide quickly.

text
You are an IAM access review assistant operating inside a permission elevation approval pipeline. Your job is to produce a structured elevation request that a human reviewer can approve, deny, or return for clarification. You do not grant access. You do not decide outcomes.

## INPUT
- Requesting User: [REQUESTING_USER_IDENTITY]
- Current Role(s): [CURRENT_ROLES]
- Requested Role(s): [REQUESTED_ROLES]
- Justification Provided: [USER_JUSTIFICATION]
- Requested Scope Duration: [SCOPE_DURATION]
- Affected Resources: [AFFECTED_RESOURCES]
- Ticket Reference: [TICKET_ID]
- Organizational Policy Reference: [POLICY_REFERENCE]

## OUTPUT_SCHEMA
Return a single JSON object with these fields:
- "request_id": string (ticket reference or generated identifier)
- "requesting_user": string
- "current_role_summary": string (plain-language summary of current access)
- "requested_role_summary": string (plain-language summary of requested access)
- "justification": string (user-provided justification, verbatim)
- "scope_duration": string (requested duration; flag if missing or permanent)
- "affected_resources": array of strings
- "segregation_of_duty_conflicts": array of objects with "conflict_description" and "severity" ("high", "medium", "low")
- "missing_fields": array of strings (required fields that are absent or underspecified)
- "risk_flags": array of strings (e.g., "permanent elevation requested", "no expiration set", "privileged role combination")
- "recommended_review_questions": array of strings (questions the reviewer should ask before approving)
- "approval_recommendation": one of "ready_for_review", "needs_clarification", "high_risk_requires_escalation"

## CONSTRAINTS
- If [SCOPE_DURATION] is missing, "permanent", or exceeds [MAX_ELEVATION_HOURS], add a risk flag and include "missing_expiration" in missing_fields.
- If [REQUESTED_ROLES] includes any role from [PRIVILEGED_ROLE_LIST], add a risk flag and check for segregation-of-duty conflicts against [CURRENT_ROLES].
- If [USER_JUSTIFICATION] is fewer than [MIN_JUSTIFICATION_CHARS] characters or contains only generic text, add "needs_clarification" to approval_recommendation.
- Never fabricate missing fields. If a required input is absent, list it in missing_fields.
- Do not include PII beyond what is provided in the input fields.

## EXAMPLES
Example input: Requesting user "alice.chen@company.com", current role "developer", requested role "db_admin", justification "need to run migration script for PROD-4421", scope duration "4 hours", affected resources "production-db-cluster".
Example output: {"request_id": "PROD-4421", "requesting_user": "alice.chen@company.com", "current_role_summary": "Standard developer access", "requested_role_summary": "Database administrator on production cluster", "justification": "need to run migration script for PROD-4421", "scope_duration": "4 hours", "affected_resources": ["production-db-cluster"], "segregation_of_duty_conflicts": [{"conflict_description": "Developer requesting DB admin on production", "severity": "medium"}], "missing_fields": [], "risk_flags": ["privileged role combination"], "recommended_review_questions": ["Has the migration been tested in staging?", "Is there a rollback plan?"], "approval_recommendation": "ready_for_review"}

## TOOLS
You have access to:
- lookup_user_roles(identity): returns current role assignments and role history
- check_sod_policy(role_a, role_b): returns any segregation-of-duty conflicts between two roles
- get_policy(policy_ref): returns the text of the organizational access policy

Call tools as needed before producing the output. If a tool call fails, note the failure in risk_flags and proceed with available data.

## RISK_LEVEL
This workflow controls access to production systems. Errors can cause data exposure, service disruption, or compliance violations. When in doubt, escalate to "high_risk_requires_escalation".

To adapt this template, replace every square-bracket placeholder with live data from your IAM system before sending the prompt to the model. The [PRIVILEGED_ROLE_LIST] should come from your role catalog. [MAX_ELEVATION_HOURS] and [MIN_JUSTIFICATION_CHARS] should match your access policy. Wire the tool implementations (lookup_user_roles, check_sod_policy, get_policy) to your actual identity provider and policy store APIs. If your model does not support native tool calling, remove the TOOLS section and pre-resolve those lookups in your application layer, injecting the results as additional context fields.

Before deploying, run this prompt against at least 20 test cases covering: missing justification, permanent elevation requests, segregation-of-duty violations, missing expiration, and normal low-risk elevations. Validate that the output JSON parses correctly and that approval_recommendation matches your expected escalation path for each case. If the model hallucinates fields or skips risk flags, tighten the CONSTRAINTS section with explicit negative examples. Always log the full prompt and response for audit, and never route an approval_recommendation of high_risk_requires_escalation to an automated approval path.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the prompt needs to work reliably. Validate these before sending to the model.

PlaceholderPurposeExampleValidation Notes

[REQUESTOR_IDENTITY]

The user or service account requesting the elevation

Must match an active directory principal. Reject null or generic service accounts without a human sponsor.

[CURRENT_ROLE]

The requestor's existing permission set or role name

ReadOnly_Analyst

Must be a valid role from the IAM catalog. Reject if the role does not exist or is already privileged.

[REQUESTED_ROLE]

The target role or permission set being requested

Security_Auditor_Write

Must be a valid role from the IAM catalog. Reject if the requested role is equal to or a subset of [CURRENT_ROLE].

[JUSTIFICATION]

Business reason and context for the elevation

Need to update firewall rules for incident #1423

Must be non-empty and contain a ticket reference or change ID. Reject purely generic justifications like 'need access'.

[SCOPE_DURATION]

How long the elevated permissions are needed

2 hours, tied to incident bridge

Must be a valid ISO 8601 duration or a concrete event boundary. Reject permanent or undefined durations.

[AFFECTED_RESOURCES]

Specific systems, data, or APIs the elevated role will access

prod-us-east-firewall-01, audit-log-bucket

Must be a non-empty list of resource ARNs or identifiers. Reject wildcard-only scopes without explicit justification.

[SEGREGATION_OF_DUTY_CONTEXT]

Current active roles or recent elevations that may conflict

Held Security_Auditor_Write 1 hour ago

Check against SoD policy matrix. Flag if [REQUESTED_ROLE] conflicts with any active or recent role from the user's session history.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the User Permission Elevation Approval Prompt into an IAM application or agent workflow with validation, retries, logging, and human review gates.

This prompt is designed to be the decision-support engine inside an automated access management system, not a standalone chatbot. The application layer is responsible for gathering the required context—current role, requested role, justification, scope, and affected resources—from the user or upstream system. The prompt then generates a structured elevation request payload that must be validated before it ever reaches a human approver. Because privilege escalation is a high-risk action, the implementation harness must enforce strict validation, idempotency, and an audit trail at every step.

Wiring the prompt into an application involves three stages: pre-prompt validation, model invocation, and post-prompt enforcement. Before calling the model, validate that all required inputs are present and well-formed. The [CURRENT_ROLE] and [REQUESTED_ROLE] fields must match your IAM role taxonomy. The [JUSTIFICATION] must be non-empty and exceed a minimum length to prevent trivial requests. The [SCOPE_DURATION] must be a parseable duration or an explicit permanent flag. If any input fails validation, return an error to the user immediately—do not invoke the model. When calling the model, use a low-temperature setting (0.0–0.2) to maximize structural consistency, and set a response_format constraint for JSON if your provider supports it. On the first invocation failure, retry once with the same parameters; if the second attempt fails, log the failure and escalate to an on-call engineer rather than silently falling back to a degraded approval request.

Post-prompt enforcement is where the harness earns its keep. Parse the model's JSON output and validate it against a strict schema that includes required fields: elevation_type (temporary or permanent), segregation_of_duty_conflicts (array of detected conflicts), expiration_timestamp (null for permanent), and risk_classification. If the output fails schema validation, do not retry the prompt—log the malformed output and block the request. If the output passes validation, check for hard blocking conditions: any detected segregation of duty violation must halt the workflow and route to a security architect for manual review. If no hard blocks exist, format the elevation request into a human-readable approval card and push it to your review queue (e.g., Jira, ServiceNow, Slack workflow). The approval card must include a unique request_id, the full prompt output, and a deep link back to the audit log. Only after explicit human approval should your application call the IAM provisioning API. Log the final decision, approver identity, and timestamp to your audit system. Never allow the model's output to directly trigger an IAM change—the human-in-the-loop gate is non-negotiable.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the structure, types, and validation rules for the permission elevation approval request generated by the prompt. Use this contract to parse the model output, validate it before routing to a human reviewer, and reject malformed requests.

Field or ElementType or FormatRequiredValidation Rule

request_id

string (UUID v4)

Must parse as a valid UUID v4. Reject if missing or malformed.

request_timestamp

string (ISO 8601)

Must parse as a valid UTC datetime. Reject if in the future or unparseable.

requesting_user

string (email or UPN)

Must match the pattern of a valid email or User Principal Name. Reject if empty.

current_role

string

Must be a non-empty string. Reject if null or whitespace only.

requested_role

string

Must be a non-empty string. Reject if identical to [CURRENT_ROLE].

justification

string

Must be between 20 and 1000 characters. Reject if shorter or longer.

scope_duration

object

Must contain 'start_time' (ISO 8601) and 'end_time' (ISO 8601). Reject if 'end_time' is before 'start_time' or if 'end_time' is null (permanent elevation requires explicit [PERMANENT_OVERRIDE] flag).

affected_resources

array of strings

Must be a non-empty array of resource ARNs or identifiers. Reject if empty or contains only whitespace strings.

segregation_of_duty_violation

boolean

Must be true or false. If true, the request must be blocked from automatic routing and require a second, explicit human approval.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when automating permission elevation approvals and how to guard against it.

01

Segregation of Duty Violations

What to watch: The prompt approves a role that creates a toxic combination with the user's existing permissions, violating SoD policies. The model fails to cross-reference requested and current roles against a conflict matrix. Guardrail: Provide a structured SoD conflict matrix in the prompt context and require an explicit sod_violations field in the output schema. Block approval if violations are non-empty.

02

Missing Expiration Timestamp

What to watch: The model generates an approval without a time-bound expires_at field, granting permanent privilege escalation by default. This occurs when the prompt does not enforce a maximum TTL. Guardrail: Add a hard constraint requiring a valid ISO 8601 expiration timestamp. Validate the output programmatically and reject any approval where expires_at is null or exceeds the organizational maximum (e.g., 24 hours).

03

Vague Justification Bypass

What to watch: The model accepts generic justifications like "needed for work" or

04

Scope Creep in Resource Access

What to watch: The requested role grants access to a broader set of resources than specified in the justification. The model fails to highlight the delta between the requested scope and the role's actual privileges. Guardrail: Include a full privilege list for the requested role in the prompt context. Require the output to explicitly list affected_resources and flag any resources outside the stated justification scope for the human reviewer.

05

Context Starvation in Approval Payload

What to watch: The generated approval request omits critical context like the user's current roles, recent login history, or anomalous activity, forcing the human approver to make a blind decision. Guardrail: Define a mandatory approval_context object in the output schema that must include current roles, last password change, and recent failed login attempts. Programmatically verify these fields are populated before sending to the review queue.

06

Silent Failure on Invalid Input

What to watch: The prompt receives a malformed user ID or a non-existent role name but hallucinates a valid-looking approval request instead of returning a structured error. Guardrail: Instruct the model to strictly validate input entities against a provided lookup table. Define a specific error_type output schema for invalid inputs and implement a circuit breaker that routes these to a human operator without generating a false approval.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks against a golden dataset of 20-30 elevation scenarios to validate output quality before shipping.

CriterionPass StandardFailure SignalTest Method

Justification Completeness

Output includes a non-empty, specific justification referencing the task, resource, or incident requiring elevation

Justification field is empty, generic ('as needed'), or copies the [REQUESTED_ROLE] verbatim

Schema check: [JUSTIFICATION] field length > 20 chars and contains at least one noun referencing a system, ticket, or event

Segregation of Duty (SoD) Violation Detection

Output correctly flags SoD conflicts when [CURRENT_ROLE] and [REQUESTED_ROLE] appear in a predefined conflict matrix

Output sets [SOD_VIOLATION] to false when a known conflict pair exists, or true when no conflict exists

Run against 10 known-conflict and 10 no-conflict pairs; require 100% accuracy on conflict detection

Scope Duration Constraint

Output [DURATION] is a valid ISO 8601 duration or UTC timestamp and does not exceed the [MAX_DURATION] policy parameter

Duration is missing, exceeds maximum, or uses an unparseable format

Parse [DURATION] with a datetime library; reject if parse fails or value > [MAX_DURATION]

Affected Resources Enumeration

Output lists at least one concrete resource ARN, instance ID, or resource path in [AFFECTED_RESOURCES]

Field is empty array, contains only wildcards ('*'), or lists resources outside the [SCOPE_BOUNDARY] parameter

Validate each resource against [SCOPE_BOUNDARY] regex or prefix list; fail if no valid resources remain

Missing Expiration Detection

Output sets [MISSING_EXPIRATION] to true when [DURATION] is null, permanent, or exceeds policy maximum

Flag remains false when duration is absent or effectively permanent

Assert [MISSING_EXPIRATION] == true for all test cases where [DURATION] is null or > 90 days

Approval Routing Correctness

Output [APPROVAL_ROLES] matches expected approver list based on [REQUESTED_ROLE] sensitivity tier

Approval list omits a required role (e.g., security officer for admin elevation) or includes unauthorized roles

Compare output [APPROVAL_ROLES] against a lookup table keyed by [REQUESTED_ROLE]; require exact match

Output Schema Validity

Output parses as valid JSON matching the expected schema with all required fields present

JSON parse fails, required field is missing, or field type is wrong (e.g., string instead of array)

Validate against JSON Schema; reject on parse error, missing required field, or type mismatch

Hallucination Resistance

Output does not invent ticket IDs, user names, or resource identifiers not present in [INPUT_CONTEXT]

Generated identifiers that do not appear in the input context or are plausible but unverifiable

Diff extracted identifiers against [INPUT_CONTEXT] token set; flag any novel identifier not grounded in input

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a frontier model and manual review of outputs. Focus on getting the justification and scope fields right before adding strict schema enforcement.

code
[SYSTEM]: You are an IAM access reviewer. Generate an elevation request with current role, requested role, justification, scope duration, and affected resources.

[USER]: Current role: [CURRENT_ROLE]
Requested role: [REQUESTED_ROLE]
Justification: [USER_JUSTIFICATION]

Watch for

  • Missing segregation of duty checks
  • Overly broad scope duration defaults
  • No expiration timestamp in output
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.