Unable to Create New User Due to InsufficientPrivilegeException

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

Not able to create new user. The following appears in the stacktrace:

com.atlassian.confluence.core.InsufficientPrivilegeException: User [user.name] does not have the required privileges.
	at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:118)

Cause

There are 2 known causes for this issue.

 

CAUSE 1

confluence-users is a default group that every new user created will be added to. Somehow confluence-users does not exist, hence the error is thrown.

This error is misleading, and we are investigating that issue here:  CONF-22778 - Getting issue details... STATUS

CAUSE 2

In case the instance was migrated from Cloud, the default group is not Confluence-users, so even adding the Confluence-users group, the issue might persist.

In this case we must locate the default group in the database and change it to be Confluence-users.

Resolution

CAUSE 1

Create the confluence-users group manually through the UI (Confluence Admin >> Manage Groups).

CAUSE 2

ALWAYS PERFORM A FULL BACKUP OF THE DATABASE BEFORE MAKING ANY CHANGE TO IT.

1) Identify the current default group of Confluence:

select bandanavalue from bandana where bandanakey='atlassian.confluence.settings';

2) Locate the <defaultUsersGroup> tag and check which is the default group for Confluence.

3) Copy the entire result of the query above and replace the default users group value inside the tag with the "confluence-users" value

4) Run a update query with the entire result from above plus the modified group. (Note that if you do this update incorrectly and remove information from the results, Confluence will crash. Make sure to have a backup of Confluence)

5) Restart Confluence and you should now be able to create new users in the default group "confluence-users"

Last modified on Dec 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.