Suppose that I have a set of of $L$ real parameters $\{\phi_1,\phi_2,\dots,\phi_L\}$, each of them taking values in the interval $[0,2\pi]$. I was wondering if there is a closed form for the following integral: $$\int_0^{2\pi}\cdots\int_0^{2\pi}\exp\left(i\sum_{m\in I}\phi_m-i\sum_{n\in I'}\phi_n\right)\,d\phi_1\cdots d\phi_L,$$ where $I=\{k_1,\dots,k_N\}$ and $I'=\{k'_1,\dots,k'_N\}$ are sets of $N$ indices (with $N<L$).
For example, for $N=2$, we have $I=\{k,l\}$, $I'=\{k',l'\}$ and the integral takes the form $$\int_0^{2\pi}\cdots\int_0^{2\pi}\exp\left[i\left(\phi_k+\phi_l-\phi_{k'}-\phi_{l'}\right)\right]\,d\phi_1\cdots d\phi_L.$$ I was able to show that, in this case, the result can be written as $$\int_0^{2\pi}\cdots\int_0^{2\pi}\exp\left[i\left(\phi_k+\phi_l-\phi_{k'}-\phi_{l'}\right)\right]\,d\phi_1\cdots d\phi_L=(2\pi)^L\left(\delta_{k,k'}\delta_{l,l'}+\delta_{k,l'}\delta_{l,k'}-\delta_{k,l}\delta_{k,l'}\delta_{l,k'}\right),$$ where $\delta_{m,n}$ stands for the Kronecker delta.
Unfortunately, I have not been able to generalize the result for $N>2$. As far as I understand, the solution to this problem relies on finding all possible (and maybe different) ways the sum $$\sum_{m\in I}\phi_m-\sum_{n\in I'}\phi_n$$ vanishes, but I have not been able to express this in terms Kronecker deltas.
The integral is $0$ is $I\neq I^\prime$ and is equal to $(2\pi)^{L}$ otherwise.
Indeed:
Thus the result $$\boxed{\int_0^{2\pi}\cdots\int_0^{2\pi}e^{\left(i\sum_{m\in I}\phi_m-i\sum_{n\in I'}\phi_n\right)}\,d\phi_1\cdots d\phi_L=\delta_{I=I^\prime}(2\pi)^L}$$ I think that converting the right-hand side into a sum of kronecker deltas on each individual members of $I$ and $I^\prime$ can be done, but it is ugly and doesn't make it clearer.