# Deactivate user account in Okta

> A Slack request ends a departing employee's Okta access. The account is deactivated, sessions end, and the run is recorded.

Source: https://stepwork.com/marketplace/deactivate-user-account-in-okta

Automatically deactivate a departing employee’s Okta account from a Slack request with Stepwork. Find the user, deactivate the account, and end every active sign-in session.

**Apps:** Okta
**Starts with:** Slack request
**Use case:** Employee offboarding
**Best for:** IT Administrator, Helpdesk Technician
**Applications used:** Okta, Slack
**Business outcome:** Risk reduction

## HR says goodbye. Okta finds out days later.

Offboarding starts with an HR notice and ends in the helpdesk queue. Someone opens the Okta admin console, searches for the person, and deactivates the account by hand. Often that is hours or days after their last day.

In that gap the person can still sign in through Okta to every application behind it: email, Slack, the CRM, the cloud console. Nobody writes down when access ended, so the audit question has no answer.

## Access ends when the request lands, not when someone gets to it

Stepwork deactivates the account in Okta and confirms the status change ended every active session. Applications behind Okta stop accepting the person at once. The run records who asked, when the account was deactivated, and whether every step completed.

- Every active Okta session is ended and confirmed.
- Every run names who requested it and when it ran.
- Every failure names the step and the reason.

## From Slack request to deactivated account

A helpdesk teammate posts the request in Slack. Stepwork runs the path recorded in the Okta admin console, in the same order every time.

1. **Request it in Slack** (Slack): A helpdesk teammate posts the departing employee's work email in the offboarding channel. That message starts the flow, and Stepwork records who asked and when.
2. **Sign in to Okta** (Okta): Stepwork opens the Okta admin console with a credential read from 1Password at run time. No Okta API token, only the access that admin account already has.
3. **Find the user by email** (Okta): Stepwork searches the Okta directory for the exact work email. If there is no match, or more than one, the run stops instead of guessing.
4. **Deactivate the account** (Okta): Stepwork deactivates the user, the same click an Okta admin makes. Sign-in through Okta ends for every application behind it.
5. **Confirm every session has ended** (Okta): Stepwork checks that the status reads Deactivated and every session has ended, then posts the result back to Slack with a timestamp.

## Same path in Okta, every departure

Stepwork is a deterministic agent platform. It runs the Okta path you recorded, not a new plan each time, so the same request produces the same steps. Credentials stay in 1Password; Stepwork holds a vault reference, never the password. When the Okta admin console changes, AI vision recognizes the element and the run continues.

## Questions

**Q: How do I deactivate a user account in Okta automatically?**
Record the deactivation once in the Okta admin console while Stepwork watches. That recording becomes a flow. From then on, a Slack request runs it: Stepwork signs in, finds the user by email, deactivates the account, and confirms every session has ended.

**Q: Can I deactivate an Okta user from Slack?**
Yes. A helpdesk teammate triggers the flow from a Slack channel with the person's work email. Stepwork does the work in Okta and posts the result back to the channel. You choose which flows are available in Slack and who can run them.

**Q: What happens when you deactivate a user in Okta?**
The account moves to a deactivated state and the person can no longer sign in through Okta. Active sessions end. Stepwork confirms that status change before it reports success. What happens inside each connected application depends on your Okta provisioning settings.

**Q: Does this remove the user from other applications?**
This flow works only in Okta. It ends sign-in through Okta to every application behind it. Accounts that live inside those applications stay until a separate flow removes them, such as suspending the user in Google Workspace or deactivating them in Slack.

**Q: Does Stepwork need an Okta API token?**
No. Stepwork works in the Okta admin console, the same way an administrator would. It signs in with a credential read from 1Password at run time and stores only the vault reference, never the password.

**Q: What if the user cannot be found, or the deactivation fails?**
The run stops at that step and records the reason. It does not report the account as deactivated, and it does not guess at a similar name. You see which step failed and can rerun it once the details are fixed. Every attempt stays in the run history.

**Q: Can I deactivate several Okta users at once?**
Yes. List the work emails in a variable table and Stepwork runs the flow once per row. Each person gets their own recorded result, so a batch of leavers ends with a record per account.

**Q: Is there a record for auditors?**
Every run keeps its status, duration, step history, who triggered it, and the reason for any failure. When an auditor asks when a departed employee lost access, the answer is in the run record.

**Q: How long does it take to set up?**
Minutes. You deactivate one user in Okta while Stepwork records it. Link the Okta credential from 1Password, make the flow available in Slack, and it is ready to run.

---

This is the Markdown version of https://stepwork.com/marketplace/deactivate-user-account-in-okta, built from the same copy as the page. Everything about Stepwork for AI tools: https://stepwork.com/llms.txt. Book a demo: https://calendly.com/shaun-maclellan/1-1-w-shaun-stepwork
