I am a bit confused about your description of what is going on. You said “If I make a backup now, the upload does not work. When I make a backup now Akeeba uploads this to Onedrive”. So, which one is it? Can you or can you not upload to OneDrive?
If you can upload to OneDrive its credentials will stay put and your problem cannot possibly occur.
If you CAN NOT upload to OneDrive there is a set of conditions where repeated failures would indeed make your OneDrive credentials be removed from the configuration.
If the authentication to OneDrive works BUT uploading to it through Akeeba Backup doesn't the problem is most likely a firewall or proxy your host put between your server ("server" here can mean a physical or virtual machine) and the Internet. We've seen many cases where a firewall was blocking all outbound access from the server or a misconfigured caching proxy was returning misleading information, ignoring the fact that it should never cache the results of POST and PUT requests per the standard.
You might wonder why setting up OneDrive would work in this case. It happens entirely through your browser. No information is sent from your server to the outside world or vice versa.
Moreover, you might see that the very first backups – taken within 3600 seconds of authorising OneDrive – work but subsequent backups fail. This has to do with how OneDrive works. When you authenticate you get an access token valid for 3600 seconds and a refresh token. When the access token expires your server needs to contact our server (www.akeeba.com) which acts as a mediator between your site and OneDrive for the purposes of authentication as detailed in the documentation. If that connection fails due to a server firewall / proxy, or you have not entered your Download ID, or the Download ID is invalid, or the Download ID is for an expired subscription then the renewal of the access token with the refresh token fails. Therefore the upload fails. After three retries the refresh token is considered invalid and removed from your configuration.
However, before passing judgement I need you to a. tell me if you can or cannot upload to OneDrive after setting up its connection in the Configuration page and b. ZIP and attach the backup log file from this first backup attempt and the next backup attempt. The two backup attempts need to be at least one hour apart for me to draw any useful conclusions.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!