What is the problem you are having with rclone?
I want to be able to refresh my token before the hour time limit expires without kill and relaunching the rclone process.
We dont want to use a username for login. We want to just use the client ID and Secret.
I can create the token manually using powershell code below and then i can update the config file and it will run for an hour.
Since this issue isn't resolved yet (see articles at bottom of this code), is there a way i can send an update command to Rclone after the config is updated so i can update the conifg file with the new token until the issue below is resolved?
i currently can run a script that updates the config with new token every 55 minutes but then I have to klll the rclone process and relaunch.
url = "https://login.microsoftonline.com/my company tenant id/oauth2/v2.0/token"
$headers = @{
"Content-Type" = "application/x-www-form-urlencoded"
}
$body = @{
client_id = "my company provided ID"
client_secret = "my company provided secret"
grant_type = "client_credentials"
scope = "https://graph.microsoft.com/.default"
}
# Send the request and store the response
$response = Invoke-RestMethod -Uri $url -Method POST -Headers $headers -Body $body
# Extract the token from the response
$token = $response.access_token
Run the command 'rclone version' and share the full output of the command.
rclone v1.65.2
- os/version: Microsoft Windows Server 2019 Datacenter 1809 (64 bit)
- os/kernel: 10.0.17763.5458 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.21.6
- go/linking: static
- go/tags: cmount
Yes
Which cloud storage system are you using? (eg Google Drive)
Sharepoint
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone mount remote: x:
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[remote]
type = onedrive
client_id = Provided id
client_secret = provided secret
no_versions = true
link_scope = organization
av_override = true
auth_url = https://login.microsoftonline.com/2My company tennat id/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/My company tennat id/oauth2/v2.0/token
token = XXX
drive_id = XXX
drive_type = documentLibrary
hash_type = sha256
### Double check the config for sensitive info before posting publicly
Im having the issue described in these closed articles here:
and here:
I realize this issue isn't resolved or at least i dont see it resolved in the github trail but i was wondering if there is temporary workaround or hack that I can implement in the mean time to update the token.