JIT Sandbox Authentication
How JIT Authentication Works
┌─────────────────────────────────────────────────────────────────┐
│ JIT Authentication Flow │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Request sandbox access │
│ │ │
│ ▼ │
│ sfp-server checks: Is this a JIT sandbox? │
│ │ │
│ │ Yes │
│ ▼ │
│ Retrieve parent production credentials │
│ │ │
│ ▼ │
│ Connect to production org │
│ │ │
│ ▼ │
│ Call Salesforce Sandbox Auth API │
│ POST /services/data/vXX.0/tooling/sandboxAuth │
│ │ │
│ ▼ │
│ Receive sandbox auth fields │
│ │ │
│ ▼ │
│ Return credentials to user │
│ (accessToken + instanceUrl OR sfdxAuthUrl) │
│ │
└─────────────────────────────────────────────────────────────────┘Benefits of JIT Authentication
Traditional Approach
JIT Approach
Setting Up JIT Sandboxes
Step 1: Register the Production Org
Step 2: Register Sandbox with Parent
Step 3: Create Environment (Optional)
Using JIT Sandboxes
Direct Sandbox Access
Via Environment
Sandbox Refresh Handling
When JIT Auth is Used
CI/CD Integration
Standard Usage
Multi-Sandbox Pipeline
Mixing JIT and Traditional Auth
Troubleshooting
"Parent production org not found"
"Unable to generate JIT auth"
"Sandbox not found"
JIT Auth Slow
Limitations
Related Topics
Last updated