# User not allowed to authenticate with gitlab

**URL:** <https://community.sonarsource.com/t/user-not-allowed-to-authenticate-with-gitlab/120317>\
**Category:** SonarQube Server / Community Build\
**Tags:** authentication, gitlab, sonarqube\
**Created:** [August 7, 2024, 9:19am UTC](https://community.sonarsource.com/t/user-not-allowed-to-authenticate-with-gitlab/120317 "2024-08-07T09:19:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaka\_Luthar](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jaka_luthar/32/41335_2.png) [@Jaka\_Luthar](https://community.sonarsource.com/u/Jaka_Luthar)\
**Post date:** [August 7, 2024, 9:19am UTC](https://community.sonarsource.com/t/user-not-allowed-to-authenticate-with-gitlab/120317/1 "2024-08-07T09:19:32Z")

</div>

User that was working before suddenly can no longer login. Authentication works for some other users, but this specific user only gets this error message when trying to login.

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/f/2/f2c35565d50099af147f20bbfba83b93678348c4.png)

- which versions are you using:

Sonarqube: sonarqube-10.5.1.90531  
Gitlab: 16.11

- how is SonarQube deployed: zip

- what are you trying to achieve: I want to make sure this specific user can login

- what have you tried so far to achieve this:

I tried tailing the log files, but there is nothing. I’ve also tried google search “sonarqube gitlab Reason: You are not allowed to authenticate” and it didn’t give me any meaningful results.

EDIT: If I set logging level to DEBUG I get one line in web.log:

> 2024.08.07 14:52:27 DEBUG web[4b25a012-e33c-4ab3-87a9-da52265321b5][auth.event] login failure [cause|You are not allowed to authenticate][method|OAUTH2][provider|EXTERNAL|GitLab][IP|0:0:0:0:0:0:0:1|][login|]

But it complains about the same thing. “not allowed to authenticate” what could this mean? Why would the user not be allowed to authenticate?

---

<div class="post-metadata">

**Author:** ![acalero](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/acalero/32/70247_2.png) [@acalero](https://community.sonarsource.com/u/acalero)\
**Post date:** [August 7, 2024, 3:10pm UTC](https://community.sonarsource.com/t/user-not-allowed-to-authenticate-with-gitlab/120317/2 "2024-08-07T15:10:13Z")

</div>

Hi!

Can you confirm the user is able to authenticate with GitLab directly?

Best regards.

---

<div class="post-metadata">

**Author:** ![Jaka\_Luthar](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jaka_luthar/32/41335_2.png) [@Jaka\_Luthar](https://community.sonarsource.com/u/Jaka_Luthar)\
**Post date:** [August 8, 2024, 6:11am UTC](https://community.sonarsource.com/t/user-not-allowed-to-authenticate-with-gitlab/120317/3 "2024-08-08T06:11:44Z")

</div>

Yes I can confirm that.

Also I have admin rights on gitlab so I can impersonate that user. I get the same error when I try to login to sonarqube when impersonating that user.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [August 9, 2024, 2:05pm UTC](https://community.sonarsource.com/t/user-not-allowed-to-authenticate-with-gitlab/120317/4 "2024-08-09T14:05:17Z")

</div>

Hi,

The message that’s showing up in your server log is coming from GitLab. I believe that’s why Antonio asked if the user could auth directly.

Since this was working, and - I assume - you didn’t change anything on the SQ side, I suppose this is something to take up with the GitLab admins…?

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![Jaka\_Luthar](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jaka_luthar/32/41335_2.png) [@Jaka\_Luthar](https://community.sonarsource.com/u/Jaka_Luthar)\
**Post date:** [September 16, 2024, 10:56am UTC](https://community.sonarsource.com/t/user-not-allowed-to-authenticate-with-gitlab/120317/5 "2024-09-16T10:56:28Z")

</div>

Sorry guys. I don’t know how I ended up fixing this. Might have been the issue with elasticsearch or something on the gitlab side.

I’m closing this topic.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [September 23, 2024, 10:56am UTC](https://community.sonarsource.com/t/user-not-allowed-to-authenticate-with-gitlab/120317/6 "2024-09-23T10:56:36Z")

</div>

Closed on September 23, 2024, 10:56am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
