microsoft / microsoft/azure-devops-go-api

[V7] ReadIdentities doens't work as intended

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

Nobody has claimed this yet.

Dominant language
Go
Stars
223
Forks
92
PR merge metrics
No merged PRs in 30d

Description

Using github.com/microsoft/azure-devops-go-api/azuredevops/v7/identity / ReadIdentities(context.Context, ReadIdentitiesArgs) (*[]Identity, error) should target https://vssps.dev.azure.com/fabrikam/_apis/identities.

Context

"github.com/microsoft/azure-devops-go-api/azuredevops/v7/identity"

test := "aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4"
legacyIdentities, err := identityClient.ReadIdentities(ctx, identity.ReadIdentitiesArgs{
  SubjectDescriptors: &test,
  QueryMembership:    &identity.QueryMembershipValues.None,
})

Waited behavior:

Using subjectDescriptors with a VSId and queryMembership=None should works in 7.1-preview.1

URI should be like: https://vssps.dev.azure.com/fabrikam/_apis/identities?subjectDescriptors=aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4&queryMembership=None&api-version=7.1-preview.1 according to the doc. (and working in with curl/postman)

Current behavior:

Using subjectDescriptors with a VSId and queryMembership=None in 7.1-preview.1 return:

Invalid argument value.\r\nParameter name: The identity (no guid supplied) is not recognized.

Is it using another endpoint?

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 identity.ReadIdentities entry point and reproduce the supplied call with the subject descriptor and queryMembership=None. Compare the request URI it produces with the documented Azure DevOps 7.1-preview.1 endpoint; done means the call targets the expected URI and returns identities without the reported invalid-argument error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.