## TL;DR
Remove the Salesforce license directly in Setup, then find why the deprovision step failed, usually the record-ownership blocker, and fix it so the next run completes.

```text
terminated employee still has Salesforce license assigned after deprovision failed
```

## Use this when
- A terminated employee still shows a Salesforce license.
- The deprovision log shows the Salesforce step failing.
- Seat counts do not drop after offboarding.

## Not for this skill when
- The employee is active. That is a license assignment question.
- The license freed but the user record remains. That may be fine.
- The failure is on the IdP side. Fix the IdP first.

## Steps
1. In Salesforce Setup, remove the license from the user, or deactivate the user, which frees it. Verify: the license is released.
2. Check the deprovision log for the failure reason on the Salesforce step. Verify: you have the specific error.
3. Fix the blocker; record ownership is the usual one, handled by transfer-then-deactivate. Verify: the blocker is cleared.
4. Re-run the deprovision step. Verify: it completes.
5. Confirm the license stays freed and the user is inactive. Verify: both states hold.

## Variant phrasings
### Salesforce license not freed
The symptom-first phrasing.
### terminated user licensed
The state-first search.
### deprovision Salesforce failed
The action-first phrasing.

Compatibility: Salesforce user and license management, all editions.

## Why it happens
License removal is a separate API call from user deactivation, and the workflow failed between the two, often on the record-ownership gate that blocks deactivation.

## Edge cases / pitfalls
- The user holding a permission set license in addition to the base license; free both.
- Community licenses with different release semantics.
- The deprovision retry hitting the same ownership blocker; transfer first, then retry.
- The license freed but immediately re-consumed by a group assignment; check assignment sources.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_opPn09nRgPGf-WMV1B8gRw
