remotely-save: OneDrive for Business auth error

It seem that there is an error about Onedrive for business authorization.

GET https://graph.microsoft.com/v1.0/drive/special/approot/children 403 (Forbidden)
Uncaught (in promise) Error: Access denied
    at Function.constructErrorFromResponse (eval at <anonymous> (app.js:1), <anonymous>:164:52791)
    at Function.eval (eval at <anonymous> (app.js:1), <anonymous>:164:53055)
    at Generator.next (<anonymous>)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:130:1278)
    at new Promise (<anonymous>)
    at s (eval at <anonymous> (app.js:1), <anonymous>:130:1023)
    at Function.getError (eval at <anonymous> (app.js:1), <anonymous>:164:52996)
    at Ni.eval (eval at <anonymous> (app.js:1), <anonymous>:164:56990)
    at Generator.throw (<anonymous>)
    at s (eval at <anonymous> (app.js:1), <anonymous>:130:1131)

And sorry I type the wrong word “Onedive”

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 24 (10 by maintainers)

Most upvoted comments

My E5 OneDrive Successfuly linked , bebow is the step:

  1. Open Obsidian app’s plugin option page, just select OneDrivePersonal, it will works for E5 office subscription

image

  1. Click the auth btn, and login your E5 account in your browser( your account should be some admin for grant permission)

image image

  1. After login success first time, will prompt you to Grant Some Permissions, But may failed for your login account was not admin, you should use admin account login info Azure portal to grant some permission. image

  2. Find the remotely-save application from EnterpriseApplications menu

  3. Enter the app settings page, find the permission section, make sure these requesed permissions was granted image

  4. Back to Obsidian plugin option page, re-click the auth button, and do login with your normal account, if there is continue button, you are success. image image

  5. Click the check button to verify OneDrive connection is Ok image

  6. Click the sync button to sync local vault’s files to OneDrive image

  7. Check the remote vault folder path. By default, the remote vault folder was created on SharePoint, Not One drive !!! You can add short link to OneDrive for easy access. image

  8. After add short link, you can visit your Vault from OneDrive, Congratulations! image

Notes for permission

You should use Admin account to grant permission requested by remotely-save plugin. After permission has granted, you can switch to your normaly used account.

Confirmed today that as an E3 customer I tried to get remotely-save to work with onedrive, went through the auth process and obsidian sat there trying to process it. At that point I killed it, went into Azure AD > Applications > Enterprise Applications > remotely-save > Permissions and used the Grant Admin Consent button, then opened Obsidian again and ran through the remotely-save onedrive auth process and it now works.

@fyears thx for your development after all, what i found this time is that after granting admin consent for the account added the remotely-save application, it’s running without any exception.

that’s is, you may need admin consent before authenticating by an admin user via azure active directory.

首先非常感谢你对这个插件的开发。

我尝试了一下,在 grant consent to 登录并添加插件的那个账号之后,一切都可以正常运作。

(可能需要管理员权限,没有添加任何额外权限。也就是说,如果要使用这个插件,可能需要管理员在 AAD 上面授权)

图一:Application Overview

图二:Application Consent & Permissions

@sometimes-naaive @hi-yiyang @JerryFake

Confirmed today that as an E3 customer I tried to get remotely-save to work with onedrive, went through the auth process and obsidian sat there trying to process it. At that point I killed it, went into Azure AD > Applications > Enterprise Applications > remotely-save > Permissions and used the Grant Admin Consent button, then opened Obsidian again and ran through the remotely-save onedrive auth process and it now works.

that’s it. the apis are the same and the logics should work between different kinds of onedrive users with Graph api enabled.

msedge_MJ1sMRZtmS image 感谢,已经连接上去了

Noted that if you are an E5 developer account user, it’s highly recommended to cover your admin name or account name in case any malicious email attack takes place.

感谢提醒,已经打码了,不过你引用的回复好像不会更新图片

image

image

感谢,已经连接上去了