microsoft-graph-docs icon indicating copy to clipboard operation
microsoft-graph-docs copied to clipboard

Unable to read results from `models.LicenseDetailsCollectionResponseable` in Golang

Open NamasteJasutin opened this issue 2 years ago • 5 comments

How does one read the results from this example?: List licenseDetails

graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)

result, err := graphClient.Me().LicenseDetails().Get(context.Background(), nil)

This becomes a models.LicenseDetailsCollectionResponseable, but there is no example nor did I figure out through the code how you can read the data.

When I enter g.appClient.UsersById(UPN).LicenseDetails().Get(context.Background(), nil) which uses the GraphHelper setup by the example code, I'm stuck at the same error.

Some help would be appreciated, this could be added to the examples.. I'm using MSGraph-sdk-go v0.59.0 go version go1.19.4 darwin/arm64

  • ChatGPT4 is using an older version (v0.20.0 microsoftgraph/msgraph-sdk-go) and was not able to help me. Just an FYI.

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

NamasteJasutin avatar Mar 23 '23 13:03 NamasteJasutin