Updating group via API is successful but not applying changes

Hi,

I’m doing group members update via API and until some while back worked without any problems.

Since few versions back (I believe after moving to major version 4) the group update is not working anymore without any (at least obvious) reason.

I’m following the api-reference doc but nothing seems to have changed here.

  • group update dry-run call is successful
  • group update call is also successful, BUT, the changes are not applied to the group (members are not being added and/or removed from the group)
  • I have tested both on groups with shared resources and groups without shared resources (same behavior)

Any hints or clues on how I can troubleshoot this issue?

This is a sample request body:

{
    "group_users": [
        {
            "user_id": "11c77ad4-3ad3-4726-8ecd-d1d3c9ad1fa0",
            "is_admin": false
        },
        {
            "id": "85170831-ae3b-4aad-b4de-c13dd8a60019",
            "delete": 1
        }
    ],
    "secrets": [
        {
            "data": "<truncated>",
            "resource_id": "120abf89-4064-4932-8eb5-55956104339a",
            "user_id": "11c77ad4-3ad3-4726-8ecd-d1d3c9ad1fa0"
        }
    ]
}

UPDATE: I’m running Passbolt CE version 4.3.0 deployed with docker containers.

Thanks!

Hi,

It seems that I am facing the same issue. Dry-run is fine but on the real run, in the api response, It displays a ‘success’ state although the group data does not contain the users I added (I have no password shared on this group, it’s just for testing pruposes)

I’m currently on version 4.4.0 CE installed with apt package manager. Creating a group from the api works fine though.

Any update on this?

Thanks a lot and have a nice day !

Hi,

I actually found the issue, which was quite trivial but easily to overlook.
In the request JSON, I had group_users instead of groups_users node.
Passbolt doesn’t complain, because it just ignores the node, but it also doesn’t do nothing.

So if you don’t receive back an error, I would suggest to analyze very carefully the syntax of the JSON content in the request. At least that was the issue on my end.

Have a nice day!

Hi,

Thanks for the follow-up ! actually, my JSON data was fine. The problem is that I was using the wrong user for the API call. The user calling the API needs to be the group manager of the group you wish to modify.

Totally overlooked that point. I was using an admin account that was not in the group :sweat_smile: