getMail() method is returning the email alias instead of real email address
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- api, authentication
Hướng nghiên cứu
Bắt đầu với getUserProfile và lệnh gọi graphClient.me().get(), sau đó kiểm tra cách User.getMail() ánh xạ phản hồi hồ sơ Microsoft Graph. So sánh hành vi của alias và địa chỉ thực được báo cáo với các scopes được liệt kê và hành vi hiện tại của SDK. Được xem là hoàn tất khi việc tra cứu hồ sơ trả về địa chỉ mong đợi hoặc ghi rõ hạn chế của API, kèm theo một regression test nếu SDK kiểm soát việc ánh xạ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
I'm using the SDK in order to allow the user to get authenticated on my platform.
The problem that I'm facing is that the getMail() is returning the email alias instead of the real email. For example:
- user get authenticated using the account danielrealuser@gmail.com;
- the user get authenticated, however, the real email address is [email protected];
- instead or returning [email protected] it returns [email protected].
Expected behavior
When requesting the data regarding the user, it should return the real user email in the property getMail, however, it gets the alias used to authenticate on Outlook.
How to reproduce
These are the scopes that I'm using (and I'll user more later not related to this topic):
"email",
"Mail.Read",
"Mail.Read.Shared",
"Mail.ReadBasic",
"Mail.ReadBasic.Shared",
"offline_access",
"openid",
"profile",
"User.Read.all",
"User.ReadBasic.All",
"ExternalUserProfile.Read.All"
Code implementation
public User getUserProfile(String accessToken) {
GraphServiceClient graphClient = createGraphServiceClient(accessToken);
return graphClient.me().get();
}
IAuthenticationResult authResult = this.exchangeCodeForTokens(authCode);
User user = this.getUserProfile(authResult.accessToken());
// Get user profile using the access token
return new MicrosoftUserData(
user.getId(),
user.getGivenName(),
user.getSurname(),
user.getMail(),
authResult.accessToken(),
authResult.accessToken(), // Use refresh token instead of access token twice
user.getDisplayName(),
getProfilePictureDataUrl(authResult.accessToken())
);
SDK Version
No response
Latest version known to work for scenario above?
6.40.0
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
- Ngôn ngữ chính
- Java
- Star
- 447
- Fork
- 155
- Merge trung bình
- 23 giờ 41 phút
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoftgraph/msgraph-sdk-java
-
status:waiting-for-triage type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoftgraph/msgraph-sdk-java#2610 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status:waiting-for-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
microsoftgraph/msgraph-sdk-java#2678 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status:waiting-for-triage type:bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
microsoftgraph/msgraph-sdk-java#2654 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status:waiting-for-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoftgraph/msgraph-sdk-java#2639 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Error in PATCH onlineMeetingĐang mởstatus:waiting-for-triage type:bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
microsoftgraph/msgraph-sdk-java#2589 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoftgraph/msgraph-sdk-java
Issue tương tự
-
A CSV row that removes a language with #CLEAR and fills another name of it keeps one of themĐang mởbug level:trivial
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
exoego/keycloak-fuhito#666 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ant-media/Ant-Media-Server#8185 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
desktop grp:about type:graphics-bug ui-public
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày
-
EC2 SSH agent launch fails with NullPointerException when HTTP proxy has no password configuredĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jenkinsci/ec2-plugin#2051 ·