c# - 使用 _claim_sources 检索组声明返回指定的 api-version 无效。该值必须与支持的版本完全匹配
问题描述
我想从 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"}}
但是,当我向声明中指定的端点发出 POST 请求时,我得到:
{
"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。
解决方案
推荐阅读
- java - HikariCP和kafka在热重载配置映射spring boot Kubernetes时重置和重载事件模式不起作用
- python - 为什么这个简单的 Python 代码会引发 UnboundLocalError 以及为什么更改一行会影响它之前的行?
- javascript - 使用 javascript 在下拉列表中选择答案
- vba - 更改源对象和记录源会给出一个空白子表单
- c# - ASP.NET MVC:在 EditorFor 显示运行时间
- flutter - 当超过行的高度大小时,如何在下一行写?
- python - python修改嵌套列表中的字符串
- matrix - R工作室中的错误说不符合的论点
- javascript - 带有 React 的内容 API 如何从数组项而不是整个数组中获取特定字段
- c++ - 这是析构函数的错误用法吗?