Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph::ListGroups API call fails with a JSON unmarshaling error #30

Closed
nmiodice opened this issue Oct 18, 2019 · 2 comments
Closed

Graph::ListGroups API call fails with a JSON unmarshaling error #30

nmiodice opened this issue Oct 18, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@nmiodice
Copy link

nmiodice commented Oct 18, 2019

The Graph API implementation for ListGroups consistently fails with a JSON unmarshaling error.

Steps to reproduce:

... initialize client
_, err := client.ListGroups(clients.ctx, graph.ListGroupsArgs{})

In my project, I need to call the API like this, which also fails:

client.ListGroups(clients.ctx, graph.ListGroupsArgs{
		ScopeDescriptor: &projectDescriptor,
		ContinuationToken: continuationToken,
})

After a brief look into the code, my initial hunch is that, possibly, the unmarshal code being called is UnmarshalBody, where it may need to be UnmarshalCollectionBody

The response in browser looks like this

{
  "count": 10,
  "value": [
    ...
  ]
}
@tiwood
Copy link

tiwood commented Oct 18, 2019

I've just hit the same issue with Graph::ListUsers.
This may affect all List methods probably?

tedchamb added a commit that referenced this issue Oct 18, 2019
tedchamb added a commit that referenced this issue Oct 18, 2019
@tedchamb
Copy link
Member

Fixed in PR #31

@tedchamb tedchamb added the bug Something isn't working label Oct 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants