Deleting users and groups¶
Deleting users and groups uses a similar pattern to the retrieval operations. For this you can use static methods provided by the AtlanUser
and AtlanGroup
classes.
All delete operations are permanent
All delete operations on users and groups are permanent, hard-deletes. There is no way to archive (soft-delete) users and groups.
Delete a group¶
For example, to delete a group:
Delete a group | |
---|---|
1 |
|
- To delete a group, you must specify its GUID and can simply call the
AtlanGroup.delete()
method. Because this operation will remove the group from Atlan, you must provide it anAtlanClient
through which to connect to the tenant.
Delete a group | |
---|---|
1 2 3 4 |
|
- To delete a group, you must specify its GUID and can simply call the
group.purge()
method.
Delete a group | |
---|---|
1 |
|
- To delete a group, you must specify its GUID and can simply call the
AtlanGroup.delete()
method. Because this operation will remove the group from Atlan, you must provide it anAtlanClient
through which to connect to the tenant.
Delete a group | |
---|---|
1 |
|
- To delete a group, you must specify its GUID and can simply call the
GroupClient.Purge()
method.
POST /api/service/groups/e79cb8eb-2bb6-4821-914c-f8dfd21fedc7/delete | |
---|---|
1 |
|
-
All details are in the URL itself.
Group ID in the URL
Note that you must provide the unique ID (GUID) of the group to delete it.
Delete a user¶
Irreversible operation that requires admin user's bearer token
Deleting a user is irreversible — be certain you want to fully remove the user and all references to the user (their ownership of assets, workflows, and so on) before running this operation. This operation can only be done using an admin user's bearer token, not an API token.
Delete a user | |
---|---|
1 2 3 4 5 6 7 8 |
|
-
Call the
ctx.UserClient.RemoveUser()
method with the following parameters :- userName: The username of the user to be removed (
"test-user-1"
in this example). - transferToUserName: The username of the user to whom the assets should be transferred (
"test-user-2"
in this example). - wfCreatorUserName (optional): The username of the workflow creator (
"test-user-3"
in this example). Ifnil
, it defaults totransferToUserName
.
- userName: The username of the user to be removed (
-
If an error occurs during the deletion, it will be logged.
Note: A user can only be removed if they have fewer permissions than an admin. An admin cannot remove another admin.