We study the question of which Polish groups can be realized as subgroups of the unitary group of a separable infinite-dimensional Hilbert space. We also show that for a separable unital C * -algebra A, the identity component U0(A) of its unitary group has property (OB) of Rosendal (hence it also has property (FH)) if and only if the algebra has finite exponential length (e.g. if it has real rank zero), while in many cases the unitary group U(A) does not have property (T). On the other hand, the p-unitary group Up(M, τ ) where M is a properly infinite semifinite von Neumann algbera with separable predual, does not have property (FH) for any 1 ≤ p < ∞. This in particular solves a problem left unanswered in the work of Pestov [Pe18].