Skip to content

Getting Information For a Specific User #158

Answered by dadams39
dadams39 asked this question in Q&A
Discussion options

You must be logged in to vote

From @baywet

First you need to build a list of all the user ids, this can be achieved through the users endpoint and with the help of the page iterator you already know how to use.
Tip: use a select query parameter so you retrieve only the Id, this will save time on the service, network and client application.
Once you've built a list of the ids, iterate through them and list the messages with the page iterator.
(use a select here too for the fields you need).

result, err := graphClient.UsersById(&UserId).Messages().Get(options)
// pass the result to the page iterator

This is the answer. Key Point: All of the information is not available just because the User struct has fields such as …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@dadams39
Comment options

@baywet
Comment options

@dadams39
Comment options

@baywet
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by dadams39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants