Brian Aldridge
Brian Aldridge

Reputation: 1

Exception while invoking Graph API URL

We are receiving an error for a single user when using the Graph API. We are not receiving this error for other user accounts. The process is going through e-mail subjects looking for subjects that begin with certain phrases. If they begin with these phrases it marks their calendars as "On Leave" for those appointments.

Has anyone run into an error like this or have some tips for troubleshooting?

Thank you,

Brian Aldridge

LeaveExchangeSync Errored -- System.AggregateException: One or more errors occurred. ---> System.Exception: Exception while invoking Graph API URL https://graph.microsoft.com/beta/Users/[email protected]/calendar/calendarView?startDateTime=2019-11-17T19:04:41&endDateTime=2021-11-17T19:04:41&top=100 ---> Microsoft.Graph.ServiceException: Code: UnknownError

Inner error

at Microsoft.Graph.HttpProvider.d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RDI.Core.Azure.GraphServiceClientExtensions.d__0.MoveNext() in C:\code\Intranet\RDI.Core\Azure\GraphServiceClientExtensions.cs:line 48 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RDI.Service.Plugins.LeaveExchangeSync.Office365Layer.d__3.MoveNext() in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\Office365Layer.cs:line 55 --- End of inner exception stack trace --- at RDI.Service.Plugins.LeaveExchangeSync.Office365Layer.d__3.MoveNext() in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\Office365Layer.cs:line 87 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RDI.Service.Plugins.LeaveExchangeSync.CalendarService.<>c__DisplayClass21_0.<b__0>d.MoveNext() in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\CalendarService.cs:line 168 --- End of inner exception stack trace --- at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at RDI.Service.Plugins.LeaveExchangeSync.CalendarService.GetUserEvents(String user) in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\CalendarService.cs:line 168 at RDI.Service.Plugins.LeaveExchangeSync.CalendarService.GetVacationEvents(String user) in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\CalendarService.cs:line 152 at RDI.Service.Plugins.LeaveExchangeSync.CalendarService.SyncAutomatedAppointments(List1 users, List`1 appointments, String eventType) in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\CalendarService.cs:line 67 at RDI.Service.Plugins.LeaveExchangeSync.LeaveExchangeSync.OnTimer(Object sender, ElapsedEventArgs e) in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\LeaveExchangeSync.cs:line 109 ---> (Inner Exception #0) System.Exception: Exception while invoking Graph API URL https://graph.microsoft.com/beta/Users/[email protected]/calendar/calendarView?startDateTime=2019-11-17T19:04:41&endDateTime=2021-11-17T19:04:41&top=100 ---> Microsoft.Graph.ServiceException: Code: UnknownError

Inner error

at Microsoft.Graph.HttpProvider.d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RDI.Core.Azure.GraphServiceClientExtensions.d__0.MoveNext() in C:\code\Intranet\RDI.Core\Azure\GraphServiceClientExtensions.cs:line 48 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RDI.Service.Plugins.LeaveExchangeSync.Office365Layer.d__3.MoveNext() in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\Office365Layer.cs:line 55 --- End of inner exception stack trace --- at RDI.Service.Plugins.LeaveExchangeSync.Office365Layer.d__3.MoveNext() in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\Office365Layer.cs:line 87 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RDI.Service.Plugins.LeaveExchangeSync.CalendarService.<>c__DisplayClass21_0.<b__0>d.MoveNext() in C:\code\Intranet\RDI.Service.Plugins.LeaveExchangeSync\CalendarService.cs:line 168<---

Upvotes: 0

Views: 514

Answers (1)

Ryanman
Ryanman

Reputation: 880

My best debugging tip would be to make that call with a tool such as postman. Inspect what's different about it from other users, or if the graph service is returning a valid HTTP code. It looks like the actual error is being buried beneath the libraries.

Upvotes: 0

Related Questions