microsoft / microsoft/azure-devops-python-api

Getting 500 error while calling graph client's create_group function

Open
#528 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
684
Forks
218
Avg merge
8d 10h
Merged PRs (30d)
1

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the graph_client.create_group call and compare its arguments with the working Azure DevOps POST endpoint shown in the issue. Inspect how GraphGroupOriginIdCreationContext is passed to the client and determine whether the 500 error comes from client usage or the library; done means documenting the cause and confirming the appropriate correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.