StoreURLtoFileDocument - Community Commons

I’m trying to use the StoreURLtoFileDocument (for the first time here), but am receiving an error.  For the three parameters, I’ve entered the URL of the web document (i.e., file stored on OneDrive), a variable object of type System File (ie., ExcelImporter.TemplateDocument) and finally, the name of the file if downloaded via a browser.  (This is an XLS file).  I’m receiving the following: A problem occurred while reading from URL Server returned HTTP response code: 403 for URL: Any ideas as to what I’m doing wrong here?    Studio Pro Version 9.0.5  
2 answers

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?