New routine for creating ClientID for OneDrive

What is the problem you are having with rclone?

Not a problem whatsoever, just asking about the changes to the process of generating ClientID for Onedrive

Run the command 'rclone version' and share the full output of the command.

1.67

Which cloud storage system are you using? (eg Google Drive)

OneDrive Personal

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync --log-level NOTICE --log-file=/home/admin/rclone.log --stats 2s --progress --transfers 4 --multi-thread-streams=8 --check-first --retries 1 --max-backlog 999999 --buffer-size 256M --copy-links /mnt/POOL1/NAS-DATA/BACKUP/ --filter-from /home/admin/my-filter.txt MYREMOTE:/

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

This is not config related.

A log from the command that you were trying to run with the -vv flag

I don't have log output

Hello, everyone. Especially @kapitansky.
Please give me a small piece of advice - Microsoft has changed how Azure works and they don't allow anymore adding applications that are not attached to some directory. Messing with directories requires an Azure account - PAYG or some other variety.

Just 2 questions, please confirm - I believe the use of directory service (is it Entra now?), at least as related to generating ClientIDs for use with Rclone, falls under the 65+ always free services.

If I have multiple OneDrive accounts (you know how many you can get with Office 365 Family) - can I generate ClientIDs for all of them using a single Azure account or I need a separate Azure account for each OneDrive I am using?

Thanks very much

1 Like

I do not have answers - yet - I am afraid. Interested as you how it works now.

Let’s see. Maybe other onedrive users can shed some light here.

I would not mind creating Azure PAYG account - at the end if used only for client id creation it should stay free forever I think. The biggest question is whether multiple client id for multiple Onedrive accounts can be created. Creating multiple Azure accounts can be very difficult as they need unique personal details and phone number.

I tried and found out that one Azure account is enough. I had one Azure account, MS Entra Admin Center is a part of it. I created an additional Client ID and it worked. The moment you create a Client ID it is not linked to anything, as I understand. So, when you use it once with an application like Rclone it gets tied to the target service, in our case Onedrive remote.

At least I was able to configure a Onedrive remote, when adding it I pasted the generated ID and secret and then generated the token and remote configuration completed without warnings and errors.

1 Like

Can you use the same ClientID with more than one service at the same time (it's what I do at the moment) or would that not work any more?

IMO yes. This is what rclone is doing by default... all rclone users (with different accounts) use the same client id. Unless they configure their own.

But then of course they all share whatever quotas and limits imposed by Microsoft.

Which is exactly why unique client id per account is recommended when maximum performance is needed.

1 Like

Hello, everyone. I have to retract what I stated yesterday. Adding a remote works, however as my tests show - there is a connection between the Microsoft Account -> Azure Account -> ClientID/Secret. So, even if a remote gets created without warnings the sync/copy routine will not work if the Client ID was created under an Azure account linked to a Microsoft Account which does not own your OneDrive.

The errors I see in the log file:

createUploadSession": couldn't fetch token: unauthorized_client: if you're using your own client id/secret, make sure they're properly set up following the docs
1 Like

Hi,

I'm also waiting for a new method to create an id/token.

Thanks.

Multiple OneDrive accounts can use the same phone number, up to a limit (20? I think). Is that not the case for Azure accounts?

I know the Microsoft developer accounts can only link to one cell phone per account you must delete the account to switch to a cell phone to a different account the other one which is also for business might very well be the same way I will find out later today I suspect.

1 Like

I just completed the following steps:

  1. I made one of my MS accounts a developer account.
  2. I signed up for a free Azure trial with that account.
  3. I created a new app ID and secret - this process seems to have stayed the same as described in Rclone docs.
  4. I added this new app ID and secret to two OneDrive remotes with rclone; one remote is the same account as the one accessing Azure, the other remote is a different account.
  5. It's been a few minutes and so far I can access both remotes just fine.

Does this mean it worked?
I figured I should be fine with one app ID & secret for all my OneDrives as I rarely ever use more than 1-2 at the same time.

I am now using the same newly-created app ID & secret on 6 different OneDrive accounts and I am not getting this or any other error message, uploads and downloads are working fine.

1 Like

Hi,

Thanks for the info. I'm working on the same project you are getting the new Microsoft platform for creating client ID and Secret.

I have it working for one account I'm getting ready to try a second.

1 Like

It works fine for me.

The only problem will be for multiple people streaming at the same time; depending on MS's unpublished rate limits, it may or may not work nicely. But that's always been the case, nothing new here; it's just that it was much easier to create multiple ID/secret combinations from multiple accounts previously.

So, a weird thing is happening today.

I have been running a very long 'rclone copy' job, from one OneDrive remote (let's call it A1) to a Jottacloud remote. This has been going on for days without any errors. I stopped it this morning.

I now want to copy some files from the server local storage into another OneDrive remote, let's call it B1.

A1 and B1 originally used the same custom client ID and secret (my own).
Today then, 'rclone copy' from local storage to B1 gives me this error:

2025/04/23 22:53:33 ERROR : video-name.mkv: Failed to copy: Get "https://graph.microsoft.com/v1.0/drives/<onedrivecode>/items/<onedrivecode>5!106:/c89aj5bqh3etgaigb4e0rrngcramfq01f60obc340l1v16upl7i0:": context canceled
2025/04/23 22:53:33 NOTICE: Failed to move with 4 errors: last error was: failed to make directory: quotaLimitReached: Quota limit reached

I have tried all manner of -vv etc. but I am not getting any more detail.

I put it down to B1 sharing a client ID with A1, from where the long copy job had been running. So, I took the chance and updated B1's client ID and secret to the new one I made using the new Azure flow (as per my previous post).

I try again, and... I am still getting the same 'quota limit reached' error!

Why? If it's using the new client ID, it should have been instantly fine... it's been hours and still getting the quota error.

Is there a way to unequivocally verify rclone's requests are using the new client ID AND that it works correctly (i.e. is accepted by this particular OneDrive)?
Would rclone silently fall back to its own default client ID if the provided client ID didn't work?
A quick test (I changed one character in the secret) suggests so, as B1 still worked, but I didn't re-authorize it (is the client ID/secret in the token somehow?).

Any insight anyone has into this will be helpful at this point.

As things stand, I am inclined to believe rclone silently falls back to its default client ID if the provided one doesn't work, but I don't know how to verify what client ID it is currently using.

So, thanks to Microsoft's wildly unhelpful error messaging, I was on a wild goose chase.

It appears that particular OneDrive account is somehow 'stuck' thinking it's full (in terms of available storage used), even though there are 62GB free (according to rclone about).

I removed one file, and then it allowed me to upload one file. Then it started telling me quota reached again. So it has nothing to do with requests or bandwidth.

It's very very odd as it's the only OneDrive account out of many that has ever behaved this way.

Hi,

Is the OneDrive that is stuck a secondary OneDrive that you added? It's not the OneDrive that you created the Microsoft Azure account with right?

In Azure I think there is a way to link to another OneDrive account and create a client ID and Secret based on that account rather than using the original account like you're doing now.

I'm going to follow first what you did and use a second remote with the same client ID and see what I get for results compared to yours.

I use a program called Fast copy to measure my speed when I compare the remote configurations with and without the client ID and secret to confirm that I'm getting better bandwidth and in this case I am getting about twice the speed. So I think it's working at least for me you can try out that program as well if you like.

The stuck OneDrive is an account completely separate from the Azure account that created the appID/secret.

However, I have a number of different accounts where I've now used the same appID/secret, and all but one are separate to the Azure one. None has this quota problem. I've just dismissed this as an MS quirk now as there doesn't seem to be a way round it.

What if you create a new client ID and Secret in addition to the one that you have? You can do that you can have more than one. Then assign that one problem when Drive account with its own new client ID and secret and token.

I would also recommend creating a new token for that one remote. Same client ID and secret but a new token. I'll post the procedure in the morning. It's a combination of generating the token at the command line and then pasting it into rclone config manually rather than letting it open a browser window.

I have reconnected that OneDrive (generating multiple new tokens in the process) with no change.

The issue first appeared when that OneDrive was using my old appID/secret. I changed to a new one, and the issue persists, so it's something very specific to that OneDrive account.

It's not a big deal to me now that I have narrowed it down, I just lose about 60 GB on that one account.

Ok,

Well that's strange but I understand that you're frustrated to the point where you're ready to move on.

Oddly, I created an account on Azure and the client ID and Secret and token and everything and two days later the token was no good anymore and I had to regenerate a new token and that you're the problem. I don't know why the token went bad after a couple of days but I'm also not going to worry about it unless it happens repeatedly.

Good luck going forward.