We consider the problem of characterising the generic rigidity of bar-joint frameworks in $mathbb{R}^d$ in which each vertex is constrained to lie in a given affine subspace. The special case when $d=2$ was previously solved by I. Streinu and L. Theran in 2010. We will extend their characterisation to the case when $dgeq 3$ and each vertex is constrained to lie in an affine subspace of dimension $t$, when $t=1,2$ and also when $tgeq 3$ and $dgeq t(t-1)$. We then point out that results on body-bar frameworks obtained by N. Katoh and S. Tanigawa in 2013 can be used to characterise when a graph has a rigid realisation as a $d$-dimensional body-bar framework with a given set of linear constraints.