I'm right now dealing with this problem too. Like oldemanw said, QAD desktop connect through the desktop user (in my case, mfgprod, mfgpilo, or mfgdesa, refering to the instance been used that moment).
I find out (reading progresstalk) that global_userid returns the QAD login name that is used...