Automate a lightweight GitHub Actions workflow to keep your Agentforce Developer Edition active by periodically authenticating and performing a harmless API call against the org.
Why automate dev org renewal?
Agentforce Developer Editions with Data Cloud are time-limited when unused. A small automated workflow that logs in via an SFDX auth URL and performs a minimal API call will register activity on the org and prevent the 45-day unused expiry window from catching you by surprise.
What you’ll need
- A signed Agentforce Developer Edition (signup: https://www.salesforce.com/form/developer-signup/?d=pb)
- Salesforce CLI (sf) configured and authenticated locally to capture the Sfdx Auth Url
- A public GitHub repository for the workflow (required for free Actions usage) and an Environment secret to store the Sfdx Auth Url
Quick setup steps
Follow these steps to create the workflow that renews your org lease:
- Log into your Agentforce dev org and run the CLI commands to capture the Sfdx Auth Url:
sf org login web -o AFDevOrg sf org display -o AFDevOrg --json --verbose # Copy the Sfdx Auth Url value from the output
- Create a GitHub repository (public) and add an Environment in Settings → Environments.
- Add a secret in that Environment and paste the copied Sfdx Auth Url as the value.
- In your repository, create a workflow file at
.github/workflows/renew.yamlthat uses the secret and runs a small script to auth and execute a harmless query (for example: query Organization or User) so the login registers. - Optionally add
workflow_dispatchfor manual runs and a cron schedule (e.g. weekly) to ensure renewal well within the 45-day window.
Sample CLI snippet used inside the action
# Authenticate with the SFDX auth url stored in ${{ secrets.SFDX_AUTH_URL }}
echo "${{ secrets.SFDX_AUTH_URL }}" | sf org login --sfdxurl --alias AFDevOrg
# Minimal call to register activity
sf data query "SELECT Id, Name FROM Organization LIMIT 1" -u AFDevOrg --jsonBest practices
- Keep the Sfdx Auth Url secret in a GitHub Environment (not a repo secret) and limit access to repository owners only.
- Use a small, non-destructive API query to ensure the org records activity (e.g., Organization or User query).
- Use both a scheduled cron trigger and workflow_dispatch so you can run the workflow on demand if needed.
- Monitor Action runs and set up notifications for failures so you can fix issues before expiry.
Resources
- GitHub repo with sample YAML: https://github.com/keirbowden/RenewAFDevOrgLease/tree/V1.0
- Salesforce Developers blog on the new dev org features: https://developer.salesforce.com/blogs/2025/03/introducing-the-new-salesforce-developer-edition-now-with-agentforce-and-data-cloud
- Agentforce Dev Org signup: https://www.salesforce.com/form/developer-signup/?d=pb
Why this matters: keeping your Agentforce dev org alive saves hours of reconfiguration and avoids losing metadata or trial features. For Salesforce admins, developers, and business users this is a low-effort automation that protects your sandbox for experimenting with Agentforce and Data Cloud features.








Leave a Reply