Get id from metadata