From 35d672217dde69e65b41b1fcd9786c1cfebcdc45 Mon Sep 17 00:00:00 2001 From: jeffmingup <1960588251@qq.com> Date: Sun, 8 Oct 2023 19:29:45 +0800 Subject: [PATCH] fix(onedrive_app): incorrect api on `_accessToken` (#5346) --- drivers/onedrive_app/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/onedrive_app/util.go b/drivers/onedrive_app/util.go index a40424bd..525a451d 100644 --- a/drivers/onedrive_app/util.go +++ b/drivers/onedrive_app/util.go @@ -71,8 +71,8 @@ func (d *OnedriveAPP) _accessToken() error { "grant_type": "client_credentials", "client_id": d.ClientID, "client_secret": d.ClientSecret, - "resource": "https://graph.microsoft.com/", - "scope": "https://graph.microsoft.com/.default", + "resource": onedriveHostMap[d.Region].Api + "/", + "scope": onedriveHostMap[d.Region].Api + "/.default", }).Post(url) if err != nil { return err