Several types of network and non-network licenses control users’ access to software. The literature on efficient selection of software licenses has mostly addressed queuing models intended to estimate the probability of denial of access for a user. Under that approach, however, the lower one sets the rejection probability, the greater the likelihood that licenses will be underused. We follow the literature in describing demand for software access with an Erlang queuing model and present a general integer program for optimizing mixed-license software portfolios under constraints on two types of risk: access rejection and license underutilization. The program, in which the number of licenses of each type is a decision variable, minimizes the total licensing cost while satisfying constraints on access denial and license underutilization. We evaluate and illustrate the ability of an efficient enumerative algorithm to solve the common problem of selecting an appropriate mix of floating and network named user licenses. Our case-study analysis indicates the potential for reducing the cost of licensing while also limiting problems associated with lack of access and underutilization.