We show that a compact embedded minimal or constant mean curvature annulus with non-vanishing Gaussian curvature which is tangent to two spheres of same radius or tangent to a sphere and meeting a plane in constant contact angle is rotational.