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 摘要。