Entra ID (ex AzureAD) allows several methods to authenticate a guest user on a tenant. Users of another tenant can use their own accounts and users that do not have a Microsoft account can authenticate using a login ID sent to their email.
When a user authenticates from our own tenant, Microsoft UserInfo endpoint provides attributes:
- sub,
- name,
- family_name,
- given_name,
- picture,
- email.
But, when a user authenticates through an external tenant or using an alternate login ID, Microsoft UserInfo endpoint provides only attributes:
- sub,
- name,
- picture,
- email
So, when Tuleap needs to create an account to register a new user, it fails to build a username and the authentication is not possible.
We propose to check if the name
attribute is available in the flow response, in addition to the attribute preferred_username
, to maximize the probability to be able to build the username.