Stoke produced another superb defensive display to come away with a vital away goal and a fourth successive clean sheet.
Thun will now travel to the Britannia next Thursday in hope more than expectation of overcoming City to reach the Europa League group stages.
Stoke made five changes from the weekend draw with Chelsea as Sorensen, Pugh, Tonge, Whitehead and the debutant Upson came in for Begovic, Delap, Pennant, Whelan and Woodgate but Stoke started well and were rewarded when Danny Pugh opened the scoring with a superb 25 yard effort.
City then had to withstand heavy second half pressure but did so professionally, and what looked quite comfortably, before nearly doubling their lead in the dying stages when the home keeper was sent off for hauling down Walters 30 yards from goal as he looked set to put the ball into the unguarded net.
Stoke now face Norwich on Sunday before the return leg in seven days time.