API Explorer 936 endpoints

Sync User Groups

POST /obp/v7.0.0/management/users/USER_ID/sync-groups

OBPv7.0.0-syncUserGroups No role required GroupUserEntitlement

Bring a user's Entitlements in line with every Group they are in, and clear what is left of Groups that have been deleted.

For each enabled Group the user is in (added to it, or holding an Entitlement it granted), at any bank id, the same as Sync Group Member (POST /management/groups/GROUP_ID/users/USER_ID/sync):

  • a Role of the Group the user does not hold at the Group's bank id is granted (the user gets an email for it), recorded against that Group;
  • an Entitlement the Group granted, for a Role the Group no longer has, is deleted, unless another Group the user is in, at the same bank id, still grants that Role: then it is kept and recorded against that Group.

Deleting a Group leaves the Entitlements it granted in place. Each of the user's Entitlements recorded against a deleted Group is moved to another Group the user is in that grants the Role at that bank id, or else deleted. These are listed with group_deleted: true.

Disabled Groups are left as they are. Entitlements granted by hand are not touched. The user is not added to or removed from any Group.

With dry_run=true nothing is changed and the response says what would be.

Requires CanAddUserToGroupAtOneBank or CanAddUserToGroupAtAllBanks, and CanRemoveUserFromGroupAtOneBank or CanRemoveUserFromGroupAtAllBanks, at the bank id of every Group involved (the AllBanks Roles for a system level Group). If any is missing, nothing is changed.

User Authentication is Required. The User must be logged in. The Application must also be authenticated.

URL Parameters:

USER_ID: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

JSON request body fields (0)
JSON response body fields (12)
dry_run
dry_run
entitlements_created
entitlements_created
entitlements_deleted
entitlements_deleted
entitlements_moved
entitlements_moved
group_deleted
group_deleted
group_id
group_id
groups
groups
role_name
to_group_id
to_group_id
user_id
9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1
username
felixsmith
bank_id
gh.29.uk
Example success response
{
  "user_id": "user-id-123",
  "username": "felixsmith",
  "dry_run": false,
  "groups": [
    {
      "group_id": "group-id-123",
      "bank_id": "gh.29.uk",
      "group_deleted": false,
      "entitlements_created": [
        "CanGetCustomer"
      ],
      "entitlements_deleted": [
        "CanCreateTransaction"
      ],
      "entitlements_moved": [
        {
          "role_name": "CanGetAccount",
          "to_group_id": "group-id-456"
        }
      ]
    },
    {
      "group_id": "group-id-789",
      "bank_id": "gh.29.uk",
      "group_deleted": true,
      "entitlements_created": [],
      "entitlements_deleted": [
        "CanGetTransaction"
      ],
      "entitlements_moved": []
    }
  ]
}
Possible errors (3)
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20005: User not found. Please specify a valid value for USER_ID.
  • OBP-50000: Unknown Error.
Implemented by OBPv7.0.0 syncUserGroups