-
Retrieve Calendar Events from Tenant LevelFollowing along with snippet I have attempted to receive the events calendar events in the following configurations none have worked: // Configuration 1: startTime := "2022-01-01T19:00:00-08:00” endTime := "2023-01-01T19:00:00-08:00"
result, err1 := client.UsersById(*userId).Calendar().CalendarView().GetWithRequestConfigurationAndResponseHandler(options, nil)
// Configuration 2
result, err1 := client.UsersById(*userId).Events().Get()
// Configuration 3
result, err1 := client.UsersById(*userId).Calendar().Get()
calendar := result.(models.Calendarable)
events := calendar.GetCalendarView() In all cases the resulting |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
are you getting any error? |
Beta Was this translation helpful? Give feedback.
-
Here is the full download of this problem of the issue. For the Tl;dr Use a selector until Get is fixed And you will be able to get the event list. I cannot claim to know why you get this behavior when using application permissions, but I posted the full code snippet below. @baywet I do believe this is actually a bug.
|
Beta Was this translation helpful? Give feedback.
Here is the full download of this problem of the issue. For the Tl;dr Use a selector until Get is fixed
When making this call from the tenant level:
result, err1 := client.UsersById(*userId).Events().Get()
I describe the print statements and below show the output
If you are confused, stay with me. It gets better. So, in models/events.go, there are fields
location
andlocations
. When the Get() function tries to returnlocation
, you get this error. So, usemsevt.EventsRequestBuilderGetRequestConfiguration
where -->
msevt "github.com/microsoftgraph/msgraph-sdk-go/users/item/events"
and do not select the location.And you will be able to get the event list. I cannot claim to know why you get…