If a Divination wizard targets a creature with the scrying spell, and the creature is about to make a roll, could the wizard use the Portent feature to affect the result?
Even if you can only see a creature because of scrying you can still use Portent on their rolls
The scrying spell states (emphasis mine):
[...] You can see and hear a particular creature you choose that is on the same plane of existence as you. [...]
Thus, the scrying spell allows you to see a creature, and that is all that is required to use the Portent feature as it states (emphasis mine):
[...] You can replace any attack roll, saving throw, or ability check made by you or a creature that you can see with one of these foretelling rolls. [...]
There is no range restriction on the Portent feature, only a visibility restriction.
This is also addressed in the Sage Advice Compendium
The Sage Advice Compendium states:
Q. Can a School of Divination wizard on the Ethereal Plane use Portent on a creature that the wizard can see on the Material Plane?
A. Yes. Portent requires you to be able to see the creature, but it has no range restriction.