The newly discovered gold-catalysed reaction of isocyanides with hydrazoic acid generated in situ from trimethylsilyl azide and methanol (or, alternatively, from NaN3/AcOH) produces either cyanamides or 1-substituted 1H-tetrazol-5-amines, depending on the amount of available HN3. The reaction proceeds selectively and in generally high yields of either product, thus providing a particularly convenient access to a wide range of substituted 1H-tetrazol-5-amines that are rather difficult to access otherwise.