This paper addresses the applicability of the convex duality method for utility maximization, in the presence of random endowment. When the price process is a locally bounded semimartingale, we show that the fundamental duality relation holds true, for a wide class of utility functions and unbounded random endowments. We show this duality by exploiting Rockafellar's theorem on integral functionals, to a random utility function.