skilion / onedrive

Free Client for OneDrive on Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot authorize: AADSTS9002313

alexswerner opened this issue · comments

Hi,

i am trying to get started with onedrive here, but the first step fails. Running either the Ubuntu supplied version v1.0.1 or the current master (945251f) i get the following error. I start onedrive, it request me to log in in the browser. I do that, copy the response url. (https://login.microsoftonline.com/common/oauth2/nativeclient? ... )

$>./onedrive 
Authorize this app visiting:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=22c49a0d-d21c-4792-aed1-8f163c982546&scope=files.readwrite%20files.readwrite.all%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient

Enter the response uri: HIDDEN
onedrive.OneDriveException@src/onedrive.d(408): HTTP request returned status code 400 (Bad Request)
{
    "correlation_id": "9d84d31c-e9c3-44f1-9d04-e847c304d223",
    "error": "invalid_grant",
    "error_codes": [
        9002313
    ],
    "error_description": "AADSTS9002313: Invalid request. Request is malformed or invalid.\r\nTrace ID: 1c5a6638-192c-44c6-9824-92136f851200\r\nCorrelation ID: 9d84d31c-e9c3-44f1-9d04-e847c304d223\r\nTimestamp: 2020-07-17 13:19:48Z",
    "error_uri": "https:\/\/login.microsoftonline.com\/error?code=9002313",
    "timestamp": "2020-07-17 13:19:48Z",
    "trace_id": "1c5a6638-192c-44c6-9824-92136f851200"
}
----------------
src/onedrive.d:33 void onedrive.OneDriveApi.checkHttpCode(ref const(std.json.JSONValue)) [0x564cc6bfdcfc]
src/onedrive.d:333 std.json.JSONValue onedrive.OneDriveApi.post!(char).post(const(char)[], const(char)[]) [0x564cc6bfde9e]
src/onedrive.d:252 void onedrive.OneDriveApi.acquireToken(const(char)[]) [0x564cc6bfcfd1]
src/onedrive.d:237 void onedrive.OneDriveApi.redeemToken(const(char)[]) [0x564cc6bfceb6]
src/onedrive.d:84 bool onedrive.OneDriveApi.authorize() [0x564cc6bfbf12]
src/onedrive.d:64 bool onedrive.OneDriveApi.init() [0x564cc6bfbd43]
src/main.d:100 _Dmain [0x564cc6bf47b6]

This is an organization account (university) with 2FA enabled. Any pointers are welcome. This is reproducible.
Thanks for this software!

@alexswerner

The 'skilion' repo was abandoned in 2018 and contains many defects that put you at risk of data loss and corruption if you use it. The original author is totally uncontactable despite numerous efforts by myself and others. Do not use this repo.

The latest and maintained code can be found here: https://github.com/abraunegg/onedrive

To be notified of new releases / bug fixes please 'star' and 'watch' the new repo location.

Major differences / Enhancements:

  • Existing bugs with 'skilion' client fixed
  • File upload / download validation to ensure data integrity
  • Support for SharePoint / Office 365 Shared Libraries
  • Support for OneDrive Business Shared Folders
  • Desktop notifications via libnotify
  • Dry-run capability to test configuration changes
  • Prevent major OneDrive accidental data deletion after configuration change
  • Support National Azure Cloud instances