mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-02 02:42:57 +02:00
Extract email for active directory users that don't have access to exchange (#3053)
This commit is contained in:
parent
bec4a29f19
commit
8567b56b8d
2 changed files with 15 additions and 5 deletions
|
@ -62,6 +62,7 @@ func newMockAPI(t *testing.T, srv *httptest.Server) http.Handler {
|
|||
"members@delta": []M{
|
||||
{"@odata.type": "#microsoft.graph.user", "id": "user-2"},
|
||||
{"@odata.type": "#microsoft.graph.user", "id": "user-3"},
|
||||
{"@odata.type": "#microsoft.graph.user", "id": "user-4"},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -73,6 +74,7 @@ func newMockAPI(t *testing.T, srv *httptest.Server) http.Handler {
|
|||
{"id": "user-1", "displayName": "User 1", "mail": "user1@example.com"},
|
||||
{"id": "user-2", "displayName": "User 2", "mail": "user2@example.com"},
|
||||
{"id": "user-3", "displayName": "User 3", "userPrincipalName": "user3_example.com#EXT#@user3example.onmicrosoft.com"},
|
||||
{"id": "user-4", "displayName": "User 4", "userPrincipalName": "user4@example.com"},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
@ -186,6 +188,12 @@ func TestProvider_UserGroups(t *testing.T) {
|
|||
DisplayName: "User 3",
|
||||
Email: "user3@example.com",
|
||||
},
|
||||
{
|
||||
Id: "user-4",
|
||||
GroupIds: []string{"test"},
|
||||
DisplayName: "User 4",
|
||||
Email: "user4@example.com",
|
||||
},
|
||||
}, users)
|
||||
testutil.AssertProtoJSONEqual(t, `[
|
||||
{ "id": "admin", "name": "Admin Group" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue