Delete users that are not part of the Organisation

Delete users that are not part of the Organisation.

Certain users are not part of the organisation anymore, and hence deactivated from the AD Groups but do still show up in Octo as users.
Is there a way we can delete their accounts in the application as well?
PS: We use Okta SSO for authentication.

Hi @Naman.Kumar,

Thanks for getting in touch!

If you navigate to Configuration > Users and select any of the relevant users. The overflow menu at the top-right will have the option to delete the user.

e.g.

Regards,
Paul

Deleting the user manual can work in a small organisation maybe,
But I meant if there is an automated way where Octopus Deploy syncs this “deactivated users” information from AD and deletes the user itself?

In order to preserve the audit record Octopus doesn’t perform any automatic user deletions.

You could write a script using the REST API to perform user deactivations or deletions based on a provided list. Which you could then run whenever you’re performing user deletions in AD.

We have a sample script that lists all users. It likely wouldn’t be too difficult to modify that to gather a list of email addresses, return the User IDs and then perform a delete on those IDs.