'java.lang.UnsupportedOperationException Could not add user initiator to group' Error when Adding a User to a Group Due to Existing Crowd User
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Adding a user to a group in JIRA when integrated with Crowd can result in the following stack trace:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Cause:
java.lang.UnsupportedOperationException: Could not add user: USER to group: GROUPNAME
Stack Trace: [hide]
java.lang.UnsupportedOperationException: Could not add user: USER to group: GROUPNAME
at com.atlassian.jira.user.util.UserUtilImpl.addUserToGroup(UserUtilImpl.java:353)
at com.atlassian.jira.user.util.UserUtilImpl.addUserToGroup(UserUtilImpl.java:342)
at com.atlassian.jira.user.util.UserUtilImpl.addUserToGroups(UserUtilImpl.java:369)
at com.atlassian.jira.bc.group.DefaultGroupService.addUsersToGroups(DefaultGroupService.java:318)
at com.atlassian.jira.web.action.admin.user.EditUserGroups.doExecute(EditUserGroups.java:79)
at webwork.action.ActionSupport.execute(ActionSupport.java:165)
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54)
at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:139)
at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:171)
Cause
The user is being added to a group that is associated with or already contains users from a directory other than the directory where the user exists (in Crowd).
Resolution
The resolution must be performed in Crowd.
To have users from two different directories in Crowd in the same group in JIRA:
In Crowd, create two groups with the same name in both directories.
Insert the respective users in the respective groups (each in their own directory).
In JIRA, the groups will appear as only one group with all users.
Was this helpful?