My configuration:
-Samsung Zfold 4 with Android 12 (One UI 4.1.1 with October 2022 patches)
-Outlook for Android 4.2240.4
-Problem occurs only when using Outlook in Samsung DeX. Other email clients function well also when using DeX with attachments, so this seems to be Outlook & Samsung DeX specific compatibility issue.
-Samsung Notes & Adobe Acrobat reader tested and .pdf reader software seems not make a difference.
When trying to open a .pdf attachment in any inbox message, the download progress bar opens quickly, pdf reader window flashes on the screen quickly, but is closed and interrupted by error message "Failed to download file".
-All apps related to the issue have been uninstalled, device rebooted and the problem still persists
-Network is checked and stable
-If the .pdf file is separately saved on the device (right-click the file in outlook and download), it will open normally in whichever .pdf reader. The problem occurs only when trying to preview the .pdf straight from Outlook.
-Opening .pdf in phone screen instead of Samsung DeX will open the file correctly, and after opening on the phone, it will open in DeX as well, as the file is already open in the background.
I think it might have something to do with app permissions. When adjusting Outlook permissions in Settings, there is no option for access to all files and media. The only choices are "Allow access to media only" and "Don´t allow". I suppose opening a file from outlook might need permission "Allow management of all files" which is not at all available to be chosen for Outlook.
All other email clients tested are working well in Samsung DeX as well except Outlook. So this certainly looks like Outlook for Android app specific issue.