Exponential random graph models (ERGMs) are a popular tool for modeling social networks representing relational data, such as working relationships or friendships. Data on exogenous variables relating to participants in the network, such as gender or age, are also often collected. ERGMs allow modeling of the effects of such exogenous variables on the joint distribution, specified by the ERGM, but not on the marginal probabilities of observing a relationship. In this article, we consider an approach to modeling a network that uses an ERGM for the joint distribution of the network, but then marginally constrains the fit to agree with a generalized linear model (GLM) defined in terms of this set of exogenous variables. This type of model, which we refer to as a marginalized ERGM, is a natural extension of the standard ERGM that allows a convenient population-averaged interpretation of parameters, for example, in terms of log odds ratios when the GLM includes a logistic link, as well as fast computation of marginal probabilities. Several algorithms to obtain maximum likelihood estimates are presented, with a particular focus on reducing the computational burden. These methods are illustrated using data on the working relationship between 36 partners in a New England law firm.