[en] The flow properties of powders are mainly due to the interplay of cohesive forces and intergrain frictional forces. We have experimentally investigated a "smart granular system" for which the interparticle cohesion can be tuned by a magnetic field B. We show that the rheological features of such a system can be controlled. Indeed, the granular flow can be controlled or even stopped by the magnetic field. Depending on the orientation of B, different dynamical regimes can be obtained like a "dry liquid state" forming conical droplets as well as a "layered soft state". Scaling lows are given for the flow rate outside a funnel as a function of B and for the stopping threshold of the flow as a function of the funnel output diameter D. From this analysis, it appears that the flowing properties are related to the dimensionality of the magnetic aggregates.