When they are deputized either as a Deputy Marshall or local Sheriff Deputy.
The rioters in DC is a case where they were deputized as deputy US Marshalls, and way out in the boonies, deputized by local sheriffs office to provide back up to local PDs.
What we see today in the riots are BP guys arresting thugs that are attacking federal property, so even when they are deputized, they didnt need it because they were stopping thugs from destroying federal property.
That would make sense. They’re TAD to the Marshal Service.