Five men were arrested after cops caught them on the roof of Trump World Tower in Midtown, police said Monday.

The group was spotted on top of the 72-story residential building on United Nations Plaza just after 8:20 p.m. Sunday, cops said.

The group was reportedly snapping photos while dangling their legs over the edge of the building, according to NBC New York.

The five men — Justin Missner, 25, Samuel Burns, 20, Thomas Durante, 22, Cameron Varela, 19, and Alexander Scott Patterson-Jones, 21 — each face a charge of third-degree criminal trespassing, cops said.

It was unclear how the group managed to get onto the roof, but the NYPD said that “signs are clearly posted saying authorized access only.”