# Onedrive for Business failed to save token

**URL:** <https://forum.rclone.org/t/onedrive-for-business-failed-to-save-token/8061>\
**Category:** Suspected Bug\
**Created:** [December 23, 2018, 9:44pm UTC](https://forum.rclone.org/t/onedrive-for-business-failed-to-save-token/8061 "2018-12-23T21:44:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![McKaiz](https://forum.rclone.org/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@McKaiz](https://forum.rclone.org/u/McKaiz)\
**Post date:** [December 23, 2018, 9:44pm UTC](https://forum.rclone.org/t/onedrive-for-business-failed-to-save-token/8061/1 "2018-12-23T21:44:38Z")

</div>

I’m on stable rclone 1.45 and try to configure Onedrive for Business on a headless machine. So I authorize through a windows machine which also runs rclone 1.45 stable. Authorizing succeeds and I get a code which I should paste into the rclone terminal of my headless machine.

When I paste I get this error: ERROR : Failed to save new token in config file: section ‘Onedrive’ not found.  
This one is new for me and this Onedrive did work a while ago.

Any ideas what’s going wrong?

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [December 26, 2018, 11:09am UTC](https://forum.rclone.org/t/onedrive-for-business-failed-to-save-token/8061/2 "2018-12-26T11:09:58Z")

</div>

> [@McKaiz](#):
>
> When I paste I get this error: ERROR : Failed to save new token in config file: section ‘Onedrive’ not found.  
> This one is new for me and this Onedrive did work a while ago.
> 
> Any ideas what’s going wrong?

That is odd. I tried to replicate it but I couldn't...

Have you tried [copying the config file](https://rclone.org/remote_setup/#configuring-by-copying-the-config-file) from the non-headless machine instead?

---

<div class="post-metadata">

**Author:** ![McKaiz](https://forum.rclone.org/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@McKaiz](https://forum.rclone.org/u/McKaiz)\
**Post date:** [December 26, 2018, 8:39pm UTC](https://forum.rclone.org/t/onedrive-for-business-failed-to-save-token/8061/3 "2018-12-26T20:39:39Z")

</div>

Thanks for trying to replicate. I’ve tried to set up the mount on my Windows computer and that worked flawless. So then I tried it again on my headless machine and it still threw the error. However I could now choose for Onedrive for Business (amongst the choices like Sharepoint and such) and then choose the Onedrive I wanted mounted.

This last part didn’t work last time, but now I got a working mount. So problem solved itself, even with the error!

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [December 28, 2018, 9:59am UTC](https://forum.rclone.org/t/onedrive-for-business-failed-to-save-token/8061/5 "2018-12-28T09:59:54Z")

</div>

I just tried the procedure with a new remote and I can see the same ERROR message - it is harmless thankfully, but a bit off-putting.

I’ve supressed the error in [the latest beta](https://beta.rclone.org) (uploaded in 15-30 minutes) - thanks for reporting 😄

---

<div class="post-metadata">

**Author:** ![McKaiz](https://forum.rclone.org/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@McKaiz](https://forum.rclone.org/u/McKaiz)\
**Post date:** [December 28, 2018, 10:11am UTC](https://forum.rclone.org/t/onedrive-for-business-failed-to-save-token/8061/6 "2018-12-28T10:11:26Z")

</div>

Cool, glad it’s not only on my side and you got it fixed! Thanks for the feedback.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [March 4, 2020, 12:50am UTC](https://forum.rclone.org/t/onedrive-for-business-failed-to-save-token/8061/7 "2020-03-04T00:50:03Z")

</div>

Closed on March 4, 2020, 12:50am UTC


