microsoft-graph-docs
microsoft-graph-docs copied to clipboard
Unable to read results from `models.LicenseDetailsCollectionResponseable` in Golang
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.
- ID: daea34fb-b26a-6e10-535c-0bc229d8be18
- Version Independent ID: 92ebd94c-a4f3-9657-95eb-d76fab8e3f56
- Content: List licenseDetails - Microsoft Graph v1.0
- Content Source: api-reference/v1.0/api/user-list-licensedetails.md
- Product: users
- Technology: microsoft-graph
- GitHub Login: @jconley76
- Microsoft Alias: MSGraphDocsVteam