Skip to content

Commit

Permalink
Update lib/msgraph/paginated.go
Browse files Browse the repository at this point in the history
Co-authored-by: Tiago Silva <[email protected]>
  • Loading branch information
mvbrock and tigrato authored Jan 10, 2025
1 parent 00b6191 commit 04ecc2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/msgraph/paginated.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ func (c *Client) IterateServicePrincipals(ctx context.Context, f func(principal
return iterateSimple(c, ctx, "servicePrincipals", f)
}

// IterateUserMembership lists all group memberships for a given user ID as directory objects.
// IterateUserMemberships lists all group memberships for a given user ID as directory objects.
// `f` will be called for each directory object in the result set.
// if `f` returns `false`, the iteration is stopped (equivalent to `break` in a normal loop).
// Ref: [https://learn.microsoft.com/en-us/graph/api/group-list-memberof].
func (c *Client) IterateUserMembership(ctx context.Context, userID string, f func(object *DirectoryObject) bool) error {
func (c *Client) IterateUserMemberships(ctx context.Context, userID string, f func(object *DirectoryObject) bool) error {
return iterateSimple(c, ctx, path.Join("users", userID, "memberOf"), f)
}

Expand Down

0 comments on commit 04ecc2d

Please sign in to comment.