Failure to get any items from within OneDrive (error 401)
Hi there
I have found an issue with my OneDrive experience. I have recently worked with Andy Holmes in gnome-online-accounts
to get my OneDrive account working through ms_graph (as there were some edge cases where the original code didn't work, one of which included mine). From this, I have now discovered a new edge case in the gvfs
implementation of ms_graph, which prevents me from being able to open any files in the drive (although I can view the file directories no problem). When I open any file, it will not load, and give an error of 401: Unauthorised. From what I can tell, this is probably (counterintuitively) because the bearer token is provided as a header in the file download request.
Testing with my problem account and another account that has no issues, I enabled libsoup debug messages for gvfs and discovered that my problem account has download urls from http://my.microsoftpersonalcontent.com, whilst my working account has download urls from public.bn.files.1drv.com. Indeed, in Postman, both return the file without putting the authentication token as a header, but microsoftpersonalcontent.com will provide a 401 error if you do add an authorization header (it must also be the correct bearer token for this to occur). I had the same issue with the Ubuntu-provided version of rclone, which is a few versions behind, but can access everything in rclone's latest beta, as they remedied this by not sending the request with the header attached.
I'm making an assumption that this is the case here too, but I could be wrong as I'm not sure how you exactly go about getting files through ms_graph here. Do you think that this is my issue? Thanks for any assistance.