User::getProfile retrieves null when it shouldn't
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza reproduciendo el flujo de transitiveMembers() e inspecciona User::getProfile() para los usuarios devueltos por esa cadena. Compáralo con graphClient.users().byUserId(user.getId()).profile().get(); se considera terminado cuando el acceso directo al perfil de User devuelve el perfil existente en el escenario descrito.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
I'm trying to get all users in a group and after that getting the users profile.
While this won't work:
- getting Users as transitiveMembers of a group
UserCollectionResponse userResult = graphClient.groups() .byGroupId(groupId) .transitiveMembers() .graphUser() .get(); - iterate over all users
userResult.getValue().forEach(this::getProfile); - call User::getProfile but it returns always null even when profile is existing and permissions are granted.
private void getProfile(User user) { Profile profile = user.getProfile(); }
It will work when you do this instead of user.getProfile() in step 3:
private void getProfile(User user) { Profile profile = graphClient.users().byUserId(user.getId()).profile().get(); }
This returns the profile for me.
Expected behavior
when calling User::getProfile i expect to get the profile back instead of null.
How to reproduce
- getting Users as transitiveMembers of a group
UserCollectionResponse userResult = graphClient.groups() .byGroupId(groupId) .transitiveMembers() .graphUser() .get(); - iterate over all users
userResult.getValue().forEach(this::getProfile); - call User::getProfile but it returns always null even when profile is existing and permissions are granted.
private void getProfile(User user) { Profile profile = user.getProfile(); }
SDK Version
6.47.0
Latest version known to work for scenario above?
No response
Known Workarounds
Use:
graphClient.users().byUserId(user.getId()).profile().get();
instead of User::getProfile
Debug output
Configuration
No response
Other information
No response
- Lenguaje dominante
- Java
- Estrellas
- 32
- Forks
- 14
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 6
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoftgraph/msgraph-beta-sdk-java
-
type:bug
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
upgrade to okhttp 5 Abiertoenhancement help wanted
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
dependency:metadata status:waiting-for-dependency
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
microsoftgraph/msgraph-beta-sdk-java#1181 · 5 comentarios · 1 reacción ·
-
type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
microsoftgraph/msgraph-beta-sdk-java#1162 · 1 comentario · 1 reacción ·
-
Cannot update sponsors of user AbiertoNeeds: attention :wave: Needs: Attention 👋 Type: Question
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
microsoftgraph/msgraph-beta-sdk-java#1002 · 2 comentarios ·
Todos los issues de microsoftgraph/msgraph-beta-sdk-java
Issues similares
-
Bug Java Platform: Java
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-java#6138 · 1 comentario ·
-
bug needs triage p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 comentario ·
-
[LNG prod] Release 2.4.6 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/rocketmq-dashboard#4654 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100