-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Labels
bugSomething isn't workingSomething isn't workingfixedservice issueIssues caused by the service (metadata/behavior)Issues caused by the service (metadata/behavior)
Description
Hi,
I am currently trying to use this library to get all members of a group.
As I did not find any documentation on how to use the results of the queries I looked into the issues and found a snippet in #79:
// response is a directory object response like for client.GroupsById("id").Members.Get(nil), where the value array is an array of directory objects // m is the import for the models package for _, do := range response.GetValue() { user := do.(m.Userable) upn := user.GetUserPrincipalName() fmt.Printf("UPN: %v\n", *upn) }
Should this work by now? When I try
if result, err := r.GraphServiceClient.GroupsById(objectID.String()).TransitiveMembers().Get(); err == nil {
for _, do := range result.GetValue() {
user := do.(models.Userable)
upn := user.GetUserPrincipalName()
logger.Info(*upn)
}I get a panic because do cannot be cast to models.Userable
Best regards
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixedservice issueIssues caused by the service (metadata/behavior)Issues caused by the service (metadata/behavior)