In this paper, we consider the power allocation (PA) problem in cognitive radio networks (CRNs) employing nonorthogonal multiple access (NOMA) technique. Specifically, we aim to maximize the number of admitted secondary users (SUs) and their throughput, without violating the interference tolerance threshold of the primary users (PUs). This problem is divided into a two-phase PA process: a) maximizing the number of admitted SUs; b) maximizing the minimum throughput among the admitted SUs. To address the first phase, we apply a sequential and iterative PA algorithm, which fully exploits the characteristics of the NOMA-based system. Following this, the second phase is shown to be quasiconvex and is optimally solved via the bisection method. Furthermore, we prove the existence of a unique solution for the second phase and propose another PA algorithm, which is also optimal and significantly reduces the complexity in contrast with the bisection method. Simulation results verify the effectiveness of the proposed two-phase PA scheme.