Uncertainty in classical stochastic programming models is often described solely by independent random parameters, ignoring their dependence on multidimensional features. We describe a novel contextual chance-constrained programming formulation that incorporates features, and argue that solutions that do not take them into account may not be implementable. Our formulation cannot be solved exactly in most cases, and we propose a tractable and fully data-driven approximate model that relies on weighted sums of random variables. We obtain a stochastic lower bound for the optimal value and feasibility results that include convergence to the true feasible set as the number of data points increases, as well as the minimal number of data points needed to obtain a feasible solution with high probability. We illustrate our findings in a vaccine allocation problem and compare the results with a naive sample average approximation approach.