Skip to content

Find user by nameOrId has undocumented implications #1311

@butonic

Description

@butonic

For the multitenancy PR we made graph able to find users by name or id: #1274 (review)

I am worried that we start to cement username to be unique which it is not. The OpenID Connect spec explicitly states that only sub+iss are unique. In a multi tenant deployment, regardless how many IdPs are used, there will be users with the same username, which is why the claim is called preferred_username.

The graph api allows using the user id or the userPrincipalName, which is a scoped username as it has the format <samaccountname>@<upnsuffix>. The upnsuffix should match the domain and often leads to upn and mailaddress to be the same.

We should at least document that the name parameter for these api calls MUST be unique over all users. I would prefer if we change the name of the variable to be mailOrID or maybe upnOrID.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions