@SuppressWarnings("unchecked")
  private ExportResult<ContactsModelWrapper> doExport(TokensAndUrlAuthData authData, String url) {
    Request.Builder graphReqBuilder = new Request.Builder().url(url);
    graphReqBuilder.header("Authorization", "Bearer " + authData.getAccessToken());

    try (Response graphResponse = client.newCall(graphReqBuilder.build()).execute()) {
      ResponseBody body = graphResponse.body();
      if (body == null) {
        return new ExportResult<>(new Exception( "Error retrieving contacts: response body was null"));
      }
      String graphBody = new String(body.bytes());
      Map graphMap = objectMapper.reader().forType(Map.class).readValue(graphBody);

      String nextLink = (String) graphMap.get(ODATA_NEXT);
      ContinuationData continuationData =
          nextLink == null ? null : new ContinuationData(new GraphPagination(nextLink));

      List<Map<String, Object>> rawContacts = (List<Map<String, Object>>) graphMap.get("value");
      if (rawContacts == null) {
        return new ExportResult<>(ExportResult.ResultType.END);
      }

      ContactsModelWrapper wrapper = transform(rawContacts);
      return new ExportResult<>(ExportResult.ResultType.CONTINUE, wrapper, continuationData);
    } catch (IOException e) {
      e.printStackTrace(); // FIXME log error
      return new ExportResult<>(e);
    }
  }
Exports Microsoft contacts using the Graph API.
extensions/data-transfer/portability-data-transfer-microsoft/src/main/java/org/datatransferproject/transfer/microsoft/contacts/MicrosoftContactsExporter.java