首页 文章

使用_claim_sources返回检索组声明返回指定的api-version无效 . 该值必须与支持的版本完全匹配

提问于
浏览
0

我想从Azure Active Directory检索登录用户的组声明 . 我已在Azure门户的应用程序清单中启用了组检索

"groupMembershipClaims": "All"

组的数量超出限制,我得到了这些声明:

_claim_names:   {"groups":"src1"}
_claim_sources: {"src1":{"endpoint":"https://graph.windows.net/12345678-0939-496d-b129-198edd916feb/users/{user-object-guid}/getMemberObjects"}}

However when I make POST request to the endpoint specified in the claims, I'm getting:

{
  "odata.error": {
  "code": "Request_DataContractVersionMissing",
  "message": {
    "lang": "en",
    "value": "The specified api-version is invalid. The value must exactly match a supported version."
    }
  }
}

我如何正确地请求群组索赔?我可以使用https://graph.microsoft.com/v1.0/me/getMemberObject,但它需要额外的权限以及为什么声明中会有另一个URI .

1 回答

  • 1

    您应该将version ?api-version=1.6 附加到 endpoints . 查看完整的代码示例here .

相关问题