microsoft / microsoft/azure-devops-python-api

Getting 500 error while calling graph client's create_group function

未关闭
#528 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
684
派生
218
平均合并
8 天 10 小时
30 天内合并 PR
1

描述

Objective: I want to add a MS Entra group to a ADO Group. I can successfully do it using the API POST https://vssps.dev.azure.com/<>/_apis/graph/groups?groupDescriptors=vssgp.Uy0....&api-version=6.0-preview.1

but whenever I am trying to use the following code I am getting a 500 error:

class GraphGroupOriginIdCreationContext(GraphGroupCreationContext):
_attribute_map = {
'origin_id': {'key': 'originId', 'type': 'str'}
}
graph_client = connection.clients_v6_0.get_graph_client()
def init(self, origin_id=None):
super(GraphGroupOriginIdCreationContext, self).init()
self.origin_id = origin_id

new_group = GraphGroupOriginIdCreationContext(origin_id="<>")

graph_client.create_group(new_group, group_descriptors="vssgp.Uy0....")

Can anyone tell me where I am getting it wrong or is this a bug?

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 graph_client.create_group 调用入手,将其参数与 issue 中所示的可正常工作的 Azure DevOps POST 端点进行比较。检查 GraphGroupOriginIdCreationContext 如何传递给客户端,并确定 500 错误是由客户端的使用方式还是库引起的;完成标准是记录原因并确认适当的修正方案。

由索引模型根据 Issue 内容生成。

评估

技术栈
azure, python
领域
api, backend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。