You should have switch to 4x4 first before entering the sand. And if sand is deep like you mentioned sand dune then you should also deflated the tire to 15 PSI from 30 PSI. Do this and you will enjoy your outlander.
What must have happen is you entered with two wheel and w/o deflation and rear wheel already dug in to sand pit. Then if you stick 4x4 it wont help as already wheels is half inside the sand.
Next time, in such situation you should have deflated the tire and gently rock (crawl at 1500 rpm) the car in first gear forward few inches, and then reverse gear backward few inches. Do this rocking for 5-10 times when you have stable flat path of 5 meters in front or reverse. Once you have this path ready, drive again till end of path and just before that flat path finishes give full throttle and keep steering turn right and left 45 degree as fast you can. You will gain momentum and get unstuck by yourself. Self recovery....!