class AzureUserFetcher {

  @SuppressWarnings("checkstyle:linelength") // Deactivated to not cut URL String
  public Collection<AadUser> fetchAzureUsers(String accessToken) throws AzureUserFetchException {
    Collection<AadUser> azureUsers = new ArrayList<>();
    for (AzureGroup azureGroup : this.azureAdProperties.getAzureGroups()) {
      String uri =
          "https://graph.microsoft.com/v1.0/groups/"
              + azureGroup.getId()
              + "/members?$select=id,givenName,surname,mail,mailNickname,jobTitle,department&$top=1";

      AzureGroupResponse response;
      do {
        response = fetchAzureUsersForGroupId(accessToken, uri);
        azureUsers.addAll(response.getUsers());
        uri = response.getOdataNextLink();
      } while (uri != null);
    }
    return azureUsers;
  }

  @Autowired public  AzureUserFetcher(AzureApiCaller azureApiCaller, AzureAdProperties azureAdProperties);

}