Somewhere between 250 and 950 people, assuming that you don't need to run it for more than a couple of watches. Your best option is a crew of droids, as they don't need the downtime a normal crew does. This presumes that normal PC-centric options (social engineering, being Jedi, being Sith) are out of the picture and that the party actually wants to be able to run the ship with their own crew for any length of time.
In the mindset of the 70's, the technology of a capital ship could not be automated to any significant degree. From a military role perspective, ISDs performed cruiser roles:
Capable of laying waste to entire worlds (provided those worlds did not have planetary shields), the Imperial-class became infamous as the prime enforcer of Imperial rule, and even served as a small, peacekeeping battleship.[17][21]
Furthermore:
Within sector-level fleets, the ISD served a central battleship role, being the flagship of the unit known as the "Battle Squadron." A Sector Group was responsible for patrolling a given sector and was composed of 24 Star Destroyers.[22] It was also observed to operate more or less independently and often far from support ships and facilities. Through many operations, the ISD functioned as a destroyer, a capital ship fast enough to chase down blockade runners and protect fleets. As an escort, it also supported Imperial Star Cruisers and Star Dreadnoughts in fleet combat.39
A cruiser:
In the later 20th century, the obsolescence of the battleship left the cruiser as the largest and most powerful surface combatant. The role of the cruiser varied according to ship and navy, often including air defence, commerce raiding and shore bombardment. The U.S. Navy in the Cold War period built guided-missile cruisers primarily designed to provide air defence, while the navy of the USSR built cruisers with heavy anti-ship missiles designed to sink NATO carrier task forces.
Thus, we have a vessel capable of patrolling on its own or operating in fleets.
With the analogy established, we can look at what it takes to run a cruiser and extrapolate from there. It's important to note that the Imperium \footnote{served very poorly by the propaganda of the rebel's amateur war films titled "Star wars"} is modeled after the soviet "Evil Empire" mythos. Therefore, an approximate ship is a Kiev Class "Aircraft Cruiser" which was subsequently reclassified as a carrier.
A Kiev has a crew of:
Crew: 1,200-1,600 (including air wing)
First, consider that a warship has to be operational 24/7, this requires at least 3 shifts.
Consider an onboard nuclear reactor, almost certainly to be simpler than the ISD's powerplant:
A nuc requires:
The current Nimitz-class A4W reactors could not handle the electrical loads demanded by EMALS and other new systems without a sharp reduction in core life. The Nimitz reactor is also complicated, with more than 30 different pipe sizes, more than 1,200 valves and 20-plus major pumps, and requires 60 watch stations to be manned when the ship is under way.
The reason it requires that many people is that there is no room for unnecessary redundancy in a warship: wasted mass can be used more profitably in doing something to further the mission. Thus, you need lots of people just to make sure every little bit is working, as there's no room for error and the machine is sufficiently complex that automation is either difficult, impossible, or wasteful (especially with pre-transistor computers).
Now, consider an ISD:
At the very least you need: people on the bridge. People at the reactor. People in environmental And people on the three different propulsion systems:
A star destroyer has three major propulsion systems. One is the hyperdrive, which achieves a crossing of the lightspeed barrier for supralight travel; the other two are concerned with movement through realspace at sublight speeds.
You also need people fiddling with shield systems, simply because space isn't empty that the speeds an ISD is travelling at. You'll want minimal crew on sensors, just to make sure you're not running into anything.
So, with this in mind, it looks like there are 3800 flight personnel listed for an ISD. Looking here, we see the Bluejacket's manual has crewing requirements for the USN. According to here: there are 6 (counting both halves of the dogwatch as 1) distinct watch-times. There's no reason to suppose that an ISD does away with this tradition. To allow for crew rest over a 6 year deployment, 3 watches will be absolutely minimum, with a likely 4 watches to account for necessary downtime. I'll assume 4 watches for this math, as it allows people a day off every so often.
3800/4 = 950 people on watch at any given time for just flight systems. As this is 950 crew running the essential functions of a mile long ship, this is not unreasonable.
There are the following logically derived areas: Bridge & Sensors, Environmental, Reactor, Hyperspace Propulsion, Sublight Propulsion, Shields. Roughly speaking 150 people for an even split, though the bridge and shields will likely take less and the reactor take way more.
The reactor of an ISD, described here has an output equivalent to a "miniature sun." Assuming that 200 people can tend a sun, even with automation, is all kinds of silly. Still, assuming automation, with merely someone running the essential activites as they come up, not counting for any margin in case of unexpected emergencies (space is full of unexpected emergencies...) assume a quarter is necessary to run themselves ragged with no backup. A skeleton crew of 250 or so to run a mile long starship for about 4 hours sounds about right. It means you can have a few people in each critical area making sure that the automation is doing what it should. Trying to run an ISD for any length of time without a normal watch means that stuff will start breaking very very very quickly as tolerances are exceeded. (Remember, military equipment assumes you know what you're doing. It'll allow itself to go out of spec instead of shutting down).
And thus, we get the 250-950 number stated above. 1970's conceptions of technology combined with a mile long ship, the running of a miniature sun to power the damn thing, three different engine systems, environmental control, and making sure the ship knows where it is and where it's going is an incredibly difficult task.
For more accurate guesses, use the spreadsheet found here.
Long deployment ships could not run 12 hour shifts for very long, even assuming hyper-disciplined clone armies. Given that there are explicit "hospitality sections" on an ISD, I can't even imagine gengineered clones being able to sustain that for 6 years. On the other hand, that would make a fascinating plot.
In a ship a mile long for a 6 year deployment, you're going to have more than simple bunks and always-on crew. (In contrast, a US sub that has a steeply limited number of crew can only deploy for a few months at best. You're going to have large food sections, what amount to on-board hotels and people to staff them, and places for clones and non-clone military to enjoy themselves. The other problem is that stormtroopers don't serve as part of flight crew, as they're part of the Imperial Army.
The huge crew is to maintain the machinery and ensure that everything stays within bounds. To be clear, they don't exactly need to be pushing buttons to keep machinery running. They need to be pushing buttons to stop from turning into a rapidly expanding cloud of plasma :) And yes, this is horribly inefficient from modern non-military standards (look at my last link) but reflects the technological biases of the time. -- Judging from some of the technokinetic tricks I know that some jedi/sith can do, the number drops sharply with a force-enabled crew. But that is functionally plot-magic.