This is something that is often said in English to politely ask a question while avoiding sounding overly intrusive. For example,
What do you do for a living, if you don't mind my asking?
The way that I would think to translate it is:
聞いてもよろしければ、何の仕事をしているのですか。
But I'm not entirely confident, because that's a literal translation, and there may be a more natural sounding set-phrase for it. Is my translation correct? Or is there a better way to say it?