【问题标题】:How to configure Code value from Azure platform 'AADSTS900144'如何从 Azure 平台“AADSTS900144”配置代码值
【发布时间】:2020-10-07 13:02:51
【问题描述】:

每当我从我的平台连接 Azure 平台并访问授权时,都会出现如下错误

授权失败并显示错误消息“AADSTS900144: The 请求正文必须包含以下参数:'code'。跟踪 ID: 0c2a6ce5-a127-491f-8ef5-34b4b0f11a00 相关 ID: 5ae207ac-ff51-43da-92a6-0225372c55b1 时间戳:2020-10-06 11:19:33Z'

同样面临范围值异常。参考链接AADSTS900144: The request body must contain the following parameter: 'scope' when using legacy Developer Portal

现在,如何获取 Azure 平台的代码值?

【问题讨论】:

  • 您是否在请求正文中添加了codescope
  • 如果我的回答对您有帮助,您可以接受它作为答案(单击答案旁边的复选标记,将其从灰色切换为已填充。)。这对其他社区成员可能是有益的。谢谢

标签: azure api azure-active-directory integration mautic


【解决方案1】:

代码将在authorization request 的响应中提供。获得后,您会将其包含在令牌请求中,详见Request an access token

【讨论】:

    【解决方案2】:

    根据您的错误消息,您在请求访问令牌时缺少请求参数。您需要在请求正文中放入以下参数:

    对于code,需要交互登录用户获取,需要在浏览器中执行如下请求获取:

    https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize?
    client_id=6731de76-14a6-49ae-97bc-6eba6914391e
    &response_type=code
    &redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F
    &response_mode=query
    &scope=openid%20offline_access%20https%3A%2F%2Fgraph.microsoft.com%2Fmail.read
    &state=12345
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-02-06
      • 2017-08-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-02
      相关资源
      最近更新 更多