Should be ok if the flight is on time. At IAD United has customs and immigration in the same building ("midfield terminal") as domestic departures for transit pax, so you don't have to ride the time-sucking mobile lounges. Just be sure to follow the sign for domestic connections rather than DC arrivals when deplaning (and there are often UA personnel shouting this same direction), or you're diverted away from the midfield customs where you want to be. C&I can be slow for non-US citizens at IAD, but of course that can be true at any US port of entry.