use of com.microsoft.graph.requests.UserCollectionPage in project msgraph-beta-sdk-java by microsoftgraph.
the class UserTests method usersKeyPhotoValueTest.
@Test
public void usersKeyPhotoValueTest() {
// GET users('<<key>>')/photo/$value
final UserCollectionPage userCollectionPage = graphServiceClient.users().buildRequest().get();
for (User user : userCollectionPage.getCurrentPage()) {
if (user.photo != null) {
InputStream stream = graphServiceClient.users(userCollectionPage.getCurrentPage().get(0).id).photo().content().buildRequest().get();
assertNotNull(stream);
break;
}
}
}
use of com.microsoft.graph.requests.UserCollectionPage in project msgraph-beta-sdk-java by microsoftgraph.
the class UserTests method getUsersWithCount.
@Test
public void getUsersWithCount() {
final List<Option> consistencyLevelOptions = Arrays.asList(new HeaderOption("ConsistencyLevel", "eventual"));
final UserCollectionPage usersWithCount = graphServiceClient.users().buildRequest(consistencyLevelOptions).count().get();
assertNotNull(usersWithCount);
assertNotNull(usersWithCount.getCount());
}
Aggregations