Not authorized: Email <xxx> is already used

Hi,

Some users cannot log in via SAML (Azure AD) with Message (entry in weblogs):
2023.04.26 09:41:31 ERROR web[AYeoIHTZuo4b7DvbBhMB][o.a.a.a.AadIdentityProvider] Exception:org.sonar.server.authentication.event.AuthenticationException: Email ‘xxx’ is already used

We did not change anything at the identity provider and some users were able to log in to sonarqube a month ago.
The only thing is that we roll out le latest 9.9 LTS version every week-end (zip)

The /api/users/search api returns following user

       {
            "login": "x-y21466",
            "name": "X Y",
            "active": true,
            "email": "xxx@yyy.com",
            "groups": [
                "sonar-admins",
                "sonar-users"
            ],
            "tokensCount": 0,
            "local": false,
            "externalIdentity": "xxx@yyy.com",
            "externalProvider": "aad",
            "avatar": "4a34614ae2045a9b7a93fba8795bb588",
            "lastConnectionDate": "2023-03-22T12:53:11+0000"
        }

How can we fix this?

Thank you
Thomas

SonarQube Enterprise Version: 9.9 (build 65466)
Azure Active Directory (AAD) Authentication Plug-in for SonarQube INTEGRATION: 2.0.0

Hi,

Welcome to the community!

Since you’re using a plugin for this integration, you should reach out to the maintainer.

Alternately, SAML support is available out-of-the-box

 
HTH,
Ann