# Can't add new group

**URL:** <https://www.dolibarr.org/forum/t/cant-add-new-group/18863>\
**Category:** Using my Dolibarr\
**Tags:** v11\
**Created:** [April 13, 2020, 12:04am UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863 "2020-04-13T00:04:37Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![mglockle](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/mglockle/32/2989_2.png) [@mglockle](https://www.dolibarr.org/forum/u/mglockle)\
**Post date:** [April 13, 2020, 12:04am UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/1 "2020-04-13T00:04:37Z")

</div>

I am an Admin.

Under Users & Groups, Groups, New group I can’t add a new group. I am getting following failure message:

Current login: mg  
Permission for this login can be defined by your Dolibarr administrator from menu Home-\>Users.

Please help

Thx  
Michael

 ![Screenshot 2020-04-13 at 01.58.54](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/e/e71b8843eb7684f5effb9f828d73849f39d9ba39.png)

---

<div class="post-metadata">

**Author:** ![simicar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/simicar/32/3072_2.png) [@simicar](https://www.dolibarr.org/forum/u/simicar)\
**Post date:** [April 13, 2020, 8:12am UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/2 "2020-04-13T08:12:06Z")

</div>

Hi Michael,

Did you check that beyond being admin, you have full rights on users and groups (permission tab under your user tab) ? That should be as an admin, but is worth verifying.

Regards,  
Marc

---

<div class="post-metadata">

**Author:** ![mglockle](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/mglockle/32/2989_2.png) [@mglockle](https://www.dolibarr.org/forum/u/mglockle)\
**Post date:** [April 13, 2020, 8:31am UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/3 "2020-04-13T08:31:01Z")

</div>

Thank you Marc, please check attached picture of my permissions:

 ![Screenshot 2020-04-13 at 10.29.44.png](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/5/596a8706433eb48c53834dc89d55284068275de0.png)

---

<div class="post-metadata">

**Author:** ![simicar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/simicar/32/3072_2.png) [@simicar](https://www.dolibarr.org/forum/u/simicar)\
**Post date:** [April 13, 2020, 8:44am UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/4 "2020-04-13T08:44:18Z")

</div>

Do you have any external module, such as multicompany ?

---

<div class="post-metadata">

**Author:** ![mglockle](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/mglockle/32/2989_2.png) [@mglockle](https://www.dolibarr.org/forum/u/mglockle)\
**Post date:** [April 13, 2020, 9:02am UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/5 "2020-04-13T09:02:08Z")

</div>

No nothing, only started now to setup User/ Products/ Customers/ Vendors …

---

<div class="post-metadata">

**Author:** ![simicar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/simicar/32/3072_2.png) [@simicar](https://www.dolibarr.org/forum/u/simicar)\
**Post date:** [April 13, 2020, 10:06am UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/6 "2020-04-13T10:06:49Z")

</div>

Sorry, I can’t see what can be wrong. This would need deeper inspection.  
If anybody else can help, he is welcome…

Regards,  
Marc

---

<div class="post-metadata">

**Author:** ![mglockle](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/mglockle/32/2989_2.png) [@mglockle](https://www.dolibarr.org/forum/u/mglockle)\
**Post date:** [April 13, 2020, 12:32pm UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/7 "2020-04-13T12:32:01Z")

</div>

Another failure message if I want Add a Group under User / User card / List of groups for this user

 ![Screenshot 2020-04-13 at 14.26.35.png](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/0/095b479cf4d37c4947a639a2b889acb0a6ecfc0b.png)

---

<div class="post-metadata">

**Author:** ![simicar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/simicar/32/3072_2.png) [@simicar](https://www.dolibarr.org/forum/u/simicar)\
**Post date:** [April 13, 2020, 1:52pm UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/8 "2020-04-13T13:52:07Z")

</div>

The behaviour is very strange. It looks like you have a problem with the entity definition. Moreover, if you are where I think you are, you should not have a -1 in the sql query (group id). What are these users ? Internal/external ? What exact version of Dolibarr are you running ? Is this a fresh install ? If not, what is the history ?  
You have to activate logging if not done already and inspect what the system is doing, notably the sql command sent before this error.  
Regards,  
Marc

---

<div class="post-metadata">

**Author:** ![mglockle](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/mglockle/32/2989_2.png) [@mglockle](https://www.dolibarr.org/forum/u/mglockle)\
**Post date:** [April 13, 2020, 4:27pm UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/9 "2020-04-13T16:27:59Z")

</div>

Picture 2

 ![Screenshot 2.png](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/d/dcd88002b402384f63140747e50e90b04e3e30c7.png)

---

<div class="post-metadata">

**Author:** ![mglockle](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/mglockle/32/2989_2.png) [@mglockle](https://www.dolibarr.org/forum/u/mglockle)\
**Post date:** [April 13, 2020, 4:28pm UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/10 "2020-04-13T16:28:23Z")

</div>

Picture 3

 ![Screenshot 3.png](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/c/c51a69fd20982ece9af5d9e3b4bd61b9e9f833d3.png)

---

<div class="post-metadata">

**Author:** ![simicar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/simicar/32/3072_2.png) [@simicar](https://www.dolibarr.org/forum/u/simicar)\
**Post date:** [April 14, 2020, 7:38am UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/11 "2020-04-14T07:38:30Z")

</div>

Thanks Michael, problem is lines are truncated in the screenshots and we are missing the one with “INSERT”. Could you provide the full log file ?  
Regards,  
Marc

---

<div class="post-metadata">

**Author:** ![mglockle](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/mglockle/32/2989_2.png) [@mglockle](https://www.dolibarr.org/forum/u/mglockle)\
**Post date:** [April 14, 2020, 9:10am UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/12 "2020-04-14T09:10:54Z")

</div>

![Screenshot 2020-04-14 at 11.09.01.png](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/5/5c697dd79a7e7cfcdcbfd059b758b4dbc05fffcd.png)

---

<div class="post-metadata">

**Author:** ![simicar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/simicar/32/3072_2.png) [@simicar](https://www.dolibarr.org/forum/u/simicar)\
**Post date:** [April 14, 2020, 9:26am UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/13 "2020-04-14T09:26:03Z")

</div>

The error you had

> [@mglockle](#):
>
> Another failure message if I want Add a Group under User / User card / List of groups for this use

is probably the one described below :

> <https://github.com/Dolibarr/dolibarr/issues/11610>
>
> \# Bug
> You have an error in your SQL syntax; check the manual that corresponds t…o your MySQL server version for the right syntax to use near '9,-1)' at line 1
> 
> \## Environment
> DOLIBARR ENVIRONMENT
> \- Version: 10.0
> \- Operating System: Linux Wed May 15 10:40:34 CEST 2019 x86\_64
> \- Web Server: Apache
> \- PHP: 7.0.33
> \- Database: MySQL or MariaDB 5.6.42-log
> \- URL(s): /user/card.php?id=5
> 
> \## Expected and actual behavior
> Expected: add a group to user
> Actual: error message
> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '8,-1)' at line 1
> 
> \## Steps to reproduce the behavior
> Go in user info. Go below to "Liste des Groupes for this user". Click "Add"
> !\[image\](https://user-images.githubusercontent.com/53564106/62287881-058e2e00-b453-11e9-9d36-a917efb69c82.png)

It means this form is to add a group to a user, you have to select a group in the list, you can’t create a new group from there…

---

<div class="post-metadata">

**Author:** ![heinja](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/h/67e7ee/32.png) [@heinja](https://www.dolibarr.org/forum/u/heinja)\
**Post date:** [July 14, 2021, 12:17pm UTC](https://www.dolibarr.org/forum/t/cant-add-new-group/18863/14 "2021-07-14T12:17:32Z")

</div>

Hi, I’ve also encountered this problem and my solution (which is hardly not technical) was:

- Go to Setup \> Security
- Disable “Use the advanced permissions of some modules”
- Go back to Users & Group \> Groups \> New Group
- Create a group, in my case, I named it “Super Admin”
- Edit the “Super Admin” to have all permissions
- Go to Users & Group \> List of users
- Select your current admin user
- Attach the newly created “Super Admin” to your admin user
- Enable “Use the advanced permissions of some modules” in Setup \> Security
- And now you should be able to access the “New Group” page without the “Access denied.” message

Good luck!
