Can't delete group with Domo Group API (Python SDK)

Hello,

I'm trying to set up some PDP Automation process using groups, however, I notice that the Python command for delete group does not work properly, I'm not sure if I have adequate permissions or if the API is just not working.

For example, when trying to run

domo.groups.delete(group_id)

I get:

"statusReason":"Bad Request","message":"Can't delete a group that contains users"

So I proceed to remove the users inside with

domo.groups.remove_user(group_id, user_id)

But then, when I try the first command, I get:

"statusReason":"Forbidden","message":"Forbidden","toe":"3ULDJ4BKT1-I4MS6-CV520"

So…

Basically now I can no loger delete a group because I'm not a manager of the group… I can't even remove the group from the website…. So is now that group orphaned and immortal??

It seems that the group API is just weird… because it forces you to remove users, but then you are locked out.

What am I doing wrong?

Any thoughts would be appreciated.

Comments

  • EricVanDerEems
    EricVanDerEems Domo Employee

    What is your role inside of Domo? We have a specific grant for "Manage All Groups" That you may need to execute this endpoint.

  • JobQuiroz
    JobQuiroz Member

    "BI Power User Fast Track". I can see the following two Grants on the Role description:

  • EricVanDerEems
    EricVanDerEems Domo Employee

    Looks like a custom role. An admin with that Manage All Groups grant should be able to delete that group via API or via the UI.

    Did you remove yourself from that group as well with that first command? That would prevent the "Edit Groups" grant from applying to that group.

  • Yes. I did remove myself because the message error was telling me that I "Can't delete a group that contains users", instead of directly telling me that I did not have permissions to do that operation regardless of the group having users within it. So, error message is kind of confusing.

    But thank you for your help, I will send an e-mail to the Admin to delete the groups wrongly created.