code: private String getPrimaryGroupId(List<String> uniqueGroupIds) {
          return uniqueGroupIds.isEmpty() ? null : uniqueGroupIds.get(0);
      }
docs: Get the primary group ID. This is assumed to be the first group in the
  group list.
  
  @param uniqueGroupIds
  @return The first entry of the list