微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Microsoft Graph API Beta ToDo List API失败,出现401

如何解决Microsoft Graph API Beta ToDo List API失败,出现401

编辑:我已将端点成功用于我的企业Office365帐户。我想将其与我的个人帐户结合使用,因为它具有我要访问的共享数据。是否有一些基本方面阻止我通过这些API访问此信息?

我尝试使用位于https://graph.microsoft.com/beta/me/todo/lists的Microsoft Graph Explorer Tool执行“我的待办任务列表” https://developer.microsoft.com/en-us/graph/graph-explorer

我为令牌设置了{ "error": { "code": "UnkNownError","message": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<Meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>401 - Unauthorized: Access is denied due to invalid credentials.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;} \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:\"trebuchet MS\",Verdana,sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div id=\"header\"><h1>Server Error</h1></div>\r\n<div id=\"content\">\r\n <div class=\"content-container\"><fieldset>\r\n <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>\r\n <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>\r\n </fieldset></div>\r\n</div>\r\n</body>\r\n</html>\r\n","innerError": { "date": "2020-10-08T17:48:38","request-id": "7989b12e-4276-4600-968a-daa59677ebfe","client-request-id": "019b2755-0eb0-40f2-7ada-6df8d36857ff" } } } 同意书,它在“修改权限”标签中将其“同意”列出。但是,调用API只会返回401错误,并显示一条非常无用的消息:

[routerLink]="'/web/about'"

是–我知道有什么问题,但我认为自己做得很好。我使用的帐户是个人帐户。

其他请求(例如https://graph.microsoft.com/beta/me)也可以正常工作。我在文档中没有发现我所缺少的任何明显的东西,所以我想尝试去听听是否有人遇到过类似的问题。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。