I am developing a native app (WinInet/C++) and after completing OAuth2 as described here and getting auth token, try to send any request to my SharePoint but get 401.
The site is SharePoint online (like https://mycompany-my.sharepoint.com), my app is registered in Azure AD.
401 response asks for X-Forms auth in the header, while I need OAuth since it has long-living token, allows several users being logged-in on the same application, gives more control on revocation and refreshing of the token.