【问题标题】:Access Token from Sharepoint来自 Sharepoint 的访问令牌
【发布时间】:2020-11-04 00:50:44
【问题描述】:

由于未提供此访问令牌,我无法获取将对我的 SharePoint 网站执行 CRUD 操作的第三方应用程序的访问令牌。

这是错误

AADSTS900144: The request body must contain the following parameter: 'grant_type'

我尝试将原始 JSON 和 Form-data 作为带有“grant_type”键的正文发送,但返回相同的错误。

发布网址:

https://accounts.accesscontrol.windows.net/<tenant ID>/tokens/OAuth/2

正文:

{
    "grant_type":"client_credentials",
    "resource":<resource>,
    "client_id":<client_id>,
    "client_secret":<client_secret>
}

【问题讨论】:

    标签: sharepoint access-token sharepoint-online


    【解决方案1】:

    您是否将正文内容放在标题中?我认为可能有一些参数格式不正确。以下是一些有助于开始使用令牌请求的教程:

    这是一个测试:

    【讨论】:

    • 为什么您的 URL 不指向特定租户?我应该从 URL 中删除租户 ID 吗?
    猜你喜欢
    • 2021-01-12
    • 2011-12-11
    • 2011-12-10
    • 2020-08-03
    • 2021-03-17
    • 1970-01-01
    • 2017-11-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多