helpdavfs2 - Support: sr #109122, Support form-and-cookie based...


sr #109122: Support form-and-cookie based authentication

Submitted by:  Iiro Laiho <ilmaisin>
Submitted on:  Tue 23 Aug 2016 09:40:39 AM UTC  
Category:  None Priority:  5 - Normal
Severity:  1 - Wish Status:  Wont Do
Privacy:  Public Assigned to:  Werner Baumann <wbaumann>
Open/Closed:  Closed Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 02 Sep 2016 08:18:21 AM UTC, comment #3: 

I did not notice that this is about OneDrive. Microsoft uses some kind of federated authentication system. Some years ago I tried to find information about the protocol but nothing I found on the Microsoft website was useful for me.


Werner Baumann <wbaumann>
Project AdministratorIn charge of this item.
Sat 27 Aug 2016 11:17:17 PM UTC, comment #2: 

I experimented with the rtFA and FedAuth cookies without success. It may be that the authentication system on ODfB is more compicated than just one or few cookies. In worst case it may be that the server checks that the cookie matches other HTTP headers of the client.

Iiro Laiho <ilmaisin>
Tue 23 Aug 2016 02:45:11 PM UTC, comment #1: 

If you know the cookie it should be quite easy. You can use option add_header in your davfs2.conf file for this. An entry should look like this:

add_header Cookie "SESSID=abcdefghijk"

Of course you must use the cookie you got using your browser. For details see "man davfs2.conf".

If the cookie changes from login to login it will become tiresome to edit your davfs2.conf every time. So you might want to create some start script to automate this. Mount option "conf=" ( see "man mount.davfs") allows you to set the name of a temporary conf file that is created by your script. If you know the form used by your server it should even be possible to retrieve the cookie automatically using a command line tool like curl.

If it works and you successfully create such a script then this might be usefull for other users too. Please report about your experience.

Werner Baumann <wbaumann>
Project AdministratorIn charge of this item.
Tue 23 Aug 2016 09:40:39 AM UTC, original submission:  

Could davfs2 somehow be made to support login with forms and cookies? That would enable to users to mount OneDrive for Business accounts to Linux machines.

Would it be possible, for example, to do this by using cookies of a web browser?

Iiro Laiho <ilmaisin>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by wbaumann (Posted a comment)
  • -email is unavailable- added by ilmaisin (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-26 wbaumann Open/ClosedOpen => Closed
    2016-09-02 wbaumann StatusIn Progress => Wont Do
    2016-08-23 wbaumann StatusNone => In Progress
        Assigned toNone => wbaumann

    Back to the top

    Powered by Savane 3.5