I need a way to access the access the following file via one-click.
I have a link for guest access to the subfolder containing the file. It is in the following format:
If trying to access the file directly without first accessing the shared folder, sharepoint will prompt for login credentials.
What I learned so far Accessing: https://WEBSITE_NAME.sharepoint.com/:f:/g/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA?e=BBBBBB --> HTTP 301 moved permanently --> redirects to the following https://WEBSITE_NAME.sharepoint.com/_layouts/15/guestaccess.aspx?e=BBBBBB&share=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&cid=CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC --> HTTP 302 found --> sets cookie FedAuth --> redirects to the following https://WEBSITE_NAME.sharepoint.com/FOLDER/SUBFOLDER?cid=CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC --> returns list of files in shared folder --> file I want to access is present in the list but --> accessing/downloading this file is not friendly/easy on mobile devices https://WEBSITE_NAME.sharepoint.com/FOLDER/SUBFOLDER/DOCUMENT.PDF --> accessing this link directly wont work without FedAuth cookie.
I tried creating a website with a hidden iframe to load the required FedAuth cookie and redirect to the desired file but the iframe load failed due to issues with "Cross origin resources"
Any tips programatically access this file or perhaps even craft a sharepoint link to fetch cookie and redirect into the desired file instead of the shared folder??
I am doing this client side on an iPhone. I do not have any access to the sharepoint permissions.