Integrated sensing and communication (ISAC) is an emerging technology in next-generation communication networks. However, the communication performance of the ISAC system may be severely affected by interference from the radar system if the sensing task has demanding performance requirements. In this paper, we exploit device-to-device communication (D2D) to improve system communication capacity. The ISAC system in a single cell D2D assisted-network is investigated, where the base station (BS) performs target sensing and communication with multiple celluar user equipments (CUEs) as well as D2D user equipments (DUEs) simultaneously communicating with other DUEs by multiplexing the same frequency resource. To achieve the optimal communication performance in the D2D-assisted ISAC system, a joint beamforming and power control problem is formulated with the goal to maximize the sum rate of the system while guaranteeing the performance requirements of radar sensing. Due to the non-convexity of the problem, we propose the algorithm to transform the origin problem into a relaxation form and obtain the solution. We also proposed the zero-forcing (ZF) beamforming scheme to acquire the solution that can eliminate the interference of the BS on DUEs. Extensive numerical simulations demonstrated that with the assistance of the D2D communications, our proposed algorithm significantly outperforms the baseline schemes in the system sum rate.