use of com.microsoft.graph.http.GraphServiceException in project opencga by opencb.
the class AzureADAuthenticationManager method getRemoteUserInformation.
@Override
public List<User> getRemoteUserInformation(List<String> userStringList) throws CatalogException {
List<com.microsoft.graph.models.extensions.User> graphUserList = new ArrayList<>(userStringList.size());
for (String userId : userStringList) {
com.microsoft.graph.models.extensions.User graphUser;
try {
graphUser = graphServiceClient.users(userId).buildRequest().get();
} catch (GraphServiceException e) {
logger.error("User '{}' not found", userId);
throw new CatalogException("User '" + userId + "' not found");
} catch (ClientException e) {
logger.error("Graph query could not be performed: {}", e.getMessage());
throw e;
}
graphUserList.add(graphUser);
}
return extractUserInformation(graphUserList);
}
Aggregations