private String importCalendar(TokenAuthData authData,
      CalendarModel calendar) throws Exception {
    List<Map<String, Object>> calendarRequests = new ArrayList<>();

    Map<String, Object> request = createRequestItem(calendar, 1, CALENDAR_SUBPATH);
    calendarRequests.add(request);

    RequestHelper.BatchResponse calendarResponse =
        RequestHelper.batchRequest(authData, calendarRequests, baseUrl, client, objectMapper);
    if (ImportResult.ResultType.OK != calendarResponse.getResult().getType()) {
      // TODO log problems
      throw new IOException("Problem importing calendar: " + calendarResponse.getResult());
    }

    Map<String, Object> body = (Map<String, Object>) calendarResponse.getBatchResponse()
        .get(0).get("body");
    return (String) body.get("id");
  }
Imports Outlook calendar information using the Microsoft Graph API.
extensions/data-transfer/portability-data-transfer-microsoft/src/main/java/org/datatransferproject/transfer/microsoft/calendar/MicrosoftCalendarImporter.java