  We solve analytically the Schr\"odinger equation for the N-dimensional
inverse square potential in quantum mechanics with a minimal length in terms of
Heun's functions. We apply our results to the problem of a dipole in a cosmic
string background. We find that a bound state exists only if the angle between
the dipole moment and the string is larger than {\pi}/4. We compare our results
with recent conflicting conclusions in the literature. The minimal length may
be interpreted as a radius of the cosmic string.
