How to delete users from Grok server

Hi Datagrok team,

I was trying to programatically delete users from Grok server (via JS API) but received an 404 error every-time.

Can you explain me what I am doing wrong?

Example

const user = await grok.dapi.users.filter('login = "userId"').first();
grok.dapi.users.delete(user)

There is no such endpoint, because you can’t delete a user. You can block it (right in the next version, I will add this feature), user.status = DG.USER_STATUS.BLOCKED

1 Like

Hello! Any update on this? Still no way to delete the user?

I don’t think it would be ever available, because user record is connected with user activity and objects ownership.

I think we cand implement safe delete (just marking users as deleted), but it’s pretty mush the same as block.

What is the purpose to delete user from your side? Maybe I’m missing something important.

Hi @eyewing - complete deletion of users is not implemented yet (perhaps in the next version), but as Alex said you can disable the account.

To disable a user account, login as administrator, navigate to Browse | Platform | Users, right-click on the user, and select “Block”. This will prevent user from logging in and using the platform, and this user
will not count towards the license.

All assets that the user has created will continue to be available in the system.
Administrators can share them with others if necessary.

Got it, thank you! Just experementing with user management, trying to understand how to deal with

2 Likes