A 403 code is a Forbidden error, so it looks like your Mendix app doesn’t have permission to access the SharePoint URL.
I’m guessing that this is a protected resource so you need to login or authenticate somehow first?
Thanks for the response Robert. What I don’t understand is that the URL (as entered as the first argument to the function) is working perfectly when entered on a browser address bar. I.e., the file opens up as expected – without any prompting for an authentication.
My understanding is that the StoreURLtoFileDocument allows one to open a URL file (such as a OneDrive document), like I would through an Open File Dialog in Windows (aka FileDocument). So there’s two other arguments, besides the URL, for StoreURLtoFileDocument: 2) Document – which I understand to be the object in Mendix which will reference the file (like the target of the selected file for the Open File Dialog), and 3) the Filename – this one I’m not sure what (the purpose of) it is…
Is an actual copy of the URL “file” downloaded and saved locally, or is this just into the application – FileDocument?