microsoft / microsoft/azure-devops-go-api
Graph::ListUsers API Fails to Return `IsDeletedInOrigin` Property Value
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 223
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
Dear Team,
I wanted to share with you that we are currently utilizing the Graph::ListUsers API to enumerate the users available within an Organization.
However, we've encountered an issue where this API consistently returns a null value for the IsDeletedInOrigin property.
For a demonstration of this problem, you can execute the Go code provided below.
package main
import (
"context"
"log"
"github.com/microsoft/azure-devops-go-api/azuredevops/v7"
"github.com/microsoft/azure-devops-go-api/azuredevops/v7/graph"
"github.com/turbot/go-kit/types"
)
func main() {
organizationUrl := "Your Org URL" // todo: replace value with your organization url
personalAccessToken := "xxxxxxxxxx" // todo: replace value with your PAT
// Create a connection to your organization
connection := azuredevops.NewPatConnection(organizationUrl, personalAccessToken)
ctx := context.Background()
// Create a client to interact with the Graph area
graphClient, err := graph.NewClient(ctx, connection)
if err != nil {
log.Fatal(err)
}
input := graph.ListUsersArgs{}
for {
users, err := graphClient.ListUsers(ctx, input)
if err != nil {
log.Fatal(err)
}
for _, user := range *users.GraphUsers {
log.Printf("Name = %v \n", *user.DisplayName)
log.Printf("IsDeleted = %v\n", user.IsDeletedInOrigin)
log.Printf("Origin = %v\n\n", *user.Origin)
}
continuationToken := *users.ContinuationToken
if continuationToken[0] == "" {
break
}
input.ContinuationToken = types.String(continuationToken[0])
}
}
Could you please take a look and let me know if I am doing anything wrong here or if there is any other supported API version that will return the value for the property IsDeletedInOrigin?
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Graph::ListUsers entry point and azuredevops/v6/graph/models.go at the IsDeletedInOrigin definition; run the provided Go reproduction against the referenced API version. Done means determining whether the property is populated or supported and documenting the supported behavior or required change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100