I would do something like this in a block like this. This hook runs on a copy of the buffer. You can change (org-id-get-create) to org-entry-get if you want.
* build :noexport:
#+BEGIN_SRC emacs-lisp
(let ((org-export-before-processing-hook
'((lambda (_backend)
(org-map-entries (lambda ()
(org-end-of-meta-data)
(insert (format "\nID: %s\n" (org-id-get-create)))))))))
(org-open-file (org-latex-export-to-pdf)))
#+END_SRC
#+RESULTS:
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803