I am trying to retrieve emails from a shared mailbox using https://github.com/microsoftgraph/msgraph-sdk-go. I've followed the steps for this package, creating the registered app, assigning the permission. My issue is with the response I am getting. Here is a snipit of the code I am running:
result, err := client.UsersById("shared@mailbox.com").Messages().Get()
if err != nil {
fmt.Printf("Error getting messages: %v\n", err)
printOdataError(err)
}
fmt.Println(result)
I get a response but it looks like this:
&{map[@odata.context:0xc0004822c0] 0xc000204b50 [0xc0000d2000 0xc0000d2400 0xc0000d2600 0xc0000d2800 0xc0000d2a00 0xc0000d2c00 0xc0000d2e00 0xc0000d3000 0xc0000d3200 0xc0000d3400]}
but I was expecting JSON, what do I need to do to get the JSON representation of this?