Skip to content

Commit

Permalink
data.azuread_user[s] - use equals insteadof startsWith when finding u…
Browse files Browse the repository at this point in the history
…sers by mailNickname (#251)

fixes #237
  • Loading branch information
katbyte authored May 15, 2020
1 parent 4ae0316 commit acecad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azuread/helpers/graph/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func UserGetByObjectId(client *graphrbac.UsersClient, ctx context.Context, objec
}

func UserGetByMailNickname(client *graphrbac.UsersClient, ctx context.Context, mailNickname string) (*graphrbac.User, error) {
filter := fmt.Sprintf("startswith(mailNickname,'%s')", mailNickname)
filter := fmt.Sprintf("mailNickname eq '%s'", mailNickname)
resp, err := client.ListComplete(ctx, filter, "")
if err != nil {
return nil, fmt.Errorf("Error listing Azure AD Users for filter %q: %+v", filter, err)
Expand Down

0 comments on commit acecad5

Please sign in to comment.