The assault rifle is the only fully automatic gun you can use in the campaign, and you can only pick one up in the final chapter, The Firefly Lab. FEDRA soldiers carry it in Boston, but you can't take theirs.
Armored FEDRA regulars in Boston fire it in bursts or on full auto, which makes them some of the most dangerous enemies you face early on. Sneak past them or wait for pistol-armed squads. Smoke bombs help when several rifles have you pinned.
Joel collects it from the Fireflies he kills at Saint Mary's Hospital while going after Ellie. Most of them drop one, and they fire it in bursts or full auto, so they can strip your health fast.