Deprovision Active Directory group via API

Recipe ToolsDirectory ServicesMarketing

What it does

When an API request arrives, this automation searches Active Directory for users in that group. If users exist, it deletes the group entry and returns the result to the caller.

Who it's for

IT teams who need to remove Active Directory groups through API calls without manual directory access.

How teams use this

Remove a group via API call

Send an API request with the group name and receive confirmation that the Active Directory group and its members were deleted. No manual steps are needed.

Integrate removal into an offboarding flow

Call this automation from an HR offboarding workflow so departing employees are removed from their Active Directory groups automatically. The same removal logic applies to a different process.

Add approval before deletion

Include a condition to check if the group has more than a threshold number of users, and require approval before deletion proceeds. Only groups meeting that condition need sign-off.

How it works

  1. Receive API request to remove group. An API call arrives with the Active Directory group name to remove. The automation receives it in real time and begins processing the request.
  2. Search for users in the group. Search Active Directory for all users assigned to that group so the automation knows whether the group has members before attempting deletion.
  3. Delete the group entry. If users were found, delete the group entry from Active Directory. The automation then searches again to verify the group no longer has members.
  4. Return the result to the caller. Send a response back to the API caller confirming whether the Active Directory group was removed or if no users were found in that group.