-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[entraid] parse user's given name and surname (#49498)
To populate the given name and surname traits, we must parse them from Entra ID responses. This PR parses the given name and surname artifacts from the json response. Signed-off-by: Tiago Silva <[email protected]>
- Loading branch information
Showing
2 changed files
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -227,9 +227,13 @@ func TestIterateUsers(t *testing.T) { | |
require.Equal(t, "[email protected]", *users[0].Mail) | ||
require.Equal(t, "Alice Alison", *users[0].DisplayName) | ||
require.Equal(t, "[email protected]", *users[0].UserPrincipalName) | ||
require.Nil(t, users[0].Surname) | ||
require.Nil(t, users[0].GivenName) | ||
|
||
require.Equal(t, "[email protected]", *users[1].Mail) | ||
require.Equal(t, "[email protected]", *users[1].UserPrincipalName) | ||
require.Equal(t, "Bobert", *users[1].Surname) | ||
require.Equal(t, "Bob", *users[1].GivenName) | ||
|
||
require.Equal(t, "[email protected]", *users[2].Mail) | ||
require.Equal(t, "[email protected]", *users[2].UserPrincipalName) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters