The userUuid and login name do not match the expected user after integrating with Azure/Entra ID

We have integrated Azure / Entra ID for user integration within SonarQube, but we’re encountering an issue where several users have the same “userUuid” value. Additionally, we’ve noticed that the “userLogin” is different from the actual name of the users, and all three have names starting with “Jan,” which is also reflected as their “externalId.”

Do we need to make any changes in the database to resolve this issue?

  • SonarQube Version: 10.4.1.88267
  • SonarQube Deployment: Helm Chart

Hi,

Have you made any changes already? Because I would have expected a unique constraint on userUuid. Or are you seeing this somewhere other than in the users table?

Different how? If you’re talking about a random-ish number added to the end of the login, that’s expected.

 
Ann

Hello, I haven’t made any changes to the table. If any changes are required, could you please let me know what needs to be done?"

For e.g. If you can see the below details the user Login is different and the actual name is different

{"userLogin":"jan-kuenzel50734","newValue":{"userLogin":"jan-kuenzel50734","externalIdentityProvider":"saml","lastConnectionDate":"2024-09-27T06:38:26+0000","userUuid":"AYh15HO82EcLDvIFA38X","name":"Jan Schumacher","externalId":"Jan","externalLogin":"Jan","isActive":true,"local":false},"createdAt":"2024-09-27T06:41:17+0000","userUuid":"AYh15HO82EcLDvIFA38X","userTriggered":true,"category":"USER","operation":"UPDATE"},

Hi,

I see that the user’s username doesn’t reflect the user’s name. While anomalous, that’s not compelling. It could be the result of e.g. a name change after marriage.

You said initially that several users and the same Uuid. Could you show some of those users?

 
Thx,
Ann

Here is the example of users which have same Uuid

{“userLogin”:“jan-kuenzel50734” ,“newValue”:{“userLogin”:“jan-kuenzel50734”,“externalIdentityProvider”:“saml”,“lastConnectionDate”:“2024-09-09T13:05:58+0000”,“userUuid”:“AYh15HO82EcLDvIFA38X” ,“name”:“Jan Schumacher” ,“externalId”:“Jan”,“externalLogin”:“Jan”,“isActive”:true,“local”:false},“createdAt”:“2024-09-09T13:09:12+0000”,“userUuid”:“AYh15HO82EcLDvIFA38X”,“userTriggered”:true,“category”:“USER”,“operation”:“UPDATE”},

{“userLogin”:“jan-kuenzel50734” ,“newValue”:{“userLogin”:“jan-kuenzel50734”,“externalIdentityProvider”:“saml”,“lastConnectionDate”:“2024-10-04T06:35:47+0000”,“userUuid”:“AYh15HO82EcLDvIFA38X” ,“name”:“Jan Haase” ,“externalId”:“Jan”,“externalLogin”:“Jan”,“isActive”:true,“email”:“*”,“local”:false},“createdAt”:“2024-10-04T07:22:44+0000”,“userUuid”:“AYh15HO82EcLDvIFA38X”,“userTriggered”:true,“category”:“USER”,“operation”:“UPDATE”},

Hi,

Where are you seeing these records?

Is this from the Audit Logs?

 
Ann

Hello @ganncamp,

These records I have fetched from user table of Sonarqube Database.

Thanks,
Aashish

Hi Aashish,

Those records look exactly like Audit Log records to me. If you pulled them from the user table, how did they get into JSON, and why is there a “newValue” sub-object?

 
Ann

Hello @ganncamp ,

The formatting is in the JSON format but these are the actual data which I have fetched from the user table.

Do you any fix for this ?

Thanks,
Aashish

Hi Aashish,

Can you please share the SQL you used to retrieve these records?

 
Thx,
Ann