This is a sample/test project that demonstrates how to grab the FedAuth And Rtfa cookies from a WebBrowser Control embedded in a WinForms app, so that you can make subsequent programmatic http calls to Sharepoint using those credentials.
OceanAirdrop/SharePointOnlineGetFedAuthAndRtfaCookie
Get FedAuth And Rtfa Cookies For SharePoint Online
C#