Adding the same user as multiple members in a single request results in listing the same user twice in the group
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 274
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 103
Description
## Describe the bug
After adding the same user twice to a group in a single request. If we request to list group member then same user listed twice
## Steps to reproduce
Steps to reproduce the behavior:
1. admin adds the following users to a group "grp1" at once using the Graph API
| username |
| Brian |
| Brian |
```
curl -k --header "Content-Type: application/json" \
--request PATCH --data \
'{
"members@odata.bind": [
"https://localhost:9200/graph/v1.0/users/4c510ada-c86b-4815-8820-42cdf82c3d51",
"https://localhost:9200/graph/v1.0/users/4c510ada-c86b-4815-8820-42cdf82c3d51"
]
}' \
'https://localhost:9200/graph/v1.0/groups/7a20f238-8a22-4458-902d-47674c317e5f' -u user:password
```
2. list the group member of `grp1`
```
curl -XGET 'https://localhost:9200/graph/v1.0/groups/67e5d9a7-ce63-4a76-b7f1-06443697bf98/members'
```
## Expected behavior
```
user Brian should be added once to a group
[
{
"accountEnabled": true,
"displayName": "Brian Murphy",
"givenName": "",
"id": "367b7965-b0c2-4ca6-845f-b65910677405",
"mail": "brian@example.org",
"onPremisesSamAccountName": "Brian",
"surname": "Brian",
"userType": "Member"
}
]
```
## Actual behavior
```
[
{
"accountEnabled": true,
"displayName": "Brian Murphy",
"givenName": "",
"id": "367b7965-b0c2-4ca6-845f-b65910677405",
"mail": "brian@example.org",
"onPremisesSamAccountName": "Brian",
"surname": "Brian",
"userType": "Member"
},
{
"accountEnabled": true,
"displayName": "Brian Murphy",
"givenName": "",
"id": "367b7965-b0c2-4ca6-845f-b65910677405",
"mail": "brian@example.org",
"onPremisesSamAccountName": "Brian",
"surname": "Brian",
"userType": "Member"
}
]
```
### In web

Contributor guide
Assessment
This issue has not been assessed yet.