README List Tasks

README List To Do Tasks #

What this does #

Retrieves tasks from the signed-in user’s default To Do Tasks list — the same list visible in Microsoft To Do and the Tasks pane in Outlook — via GET /me/todo/lists/Tasks/tasks. Authentication uses OAuth 2.0 with delegated permissions via VBAuth, supporting MFA. All tasks are fetched and filtered client-side by importance, due date, and completion status. Results display title, status, importance, and due date for each matching task.

Office apps #

  • Access (tested M365)
  • Excel (untested M365)

Required components #

  • VBAuth.dll v1.x
  • modVBAuthGlobalConstants.bas (from /shared)
  • JSONConverter.bas (Tim Hall VBA-JSON)
  • modListToDoTasks.bas (this module)

Azure Entra App Registration #

Delegated permissions:

  • Tasks.Read

Note: application permissions are not supported for this endpoint. Admin consent is required for Tasks.Read in most organisational tenants.

VBAuth Admin Table – Required Values #

Column NameRequired Value / ExampleNotes
AppID13Identifies this feature’s configuration record
ActionNameVBAuth – List To Do TasksDisplay name — any value acceptable
ClientID(your App Client ID)GUID from Azure App Registration Overview blade
TenantID(your Tenant ID)GUID from Azure App Registration Overview blade
ObjectID(your Object ID)Set by PopulateMissingObjectIDs
ScopeClaimsTasks.ReadComma-separated Graph scopes
VerbGETHTTP method
URLPart1https://graph.microsoft.com/v1.0/me/todo/lists/Tasks/tasksGraph endpoint
URLParameter1NO VALUE REQUIREDNot used
URLPart2NO VALUE REQUIREDNot used
URLParameter2NO VALUE REQUIREDNot used
URLPart3NO VALUE REQUIREDNot used
WaitForLogin60Seconds — NB MSXML2 timeout parameters are in milliseconds

Module: modListToDoTasks.bas #

Public functions #

Public Function ListToDoTasks( _
    strImportanceFilter As String, _
    dtDueOnOrBefore As Date, _
    blnHasDueFilter As Boolean, _
    blnShowCompleted As Boolean, _
    ByRef strMessage As String) As Boolean
Code language: JavaScript (javascript)

Sets intAppID = 13, loads configuration from lclVBAuthAdmin, acquires a bearer token for Tasks.Read, GETs all tasks from /me/todo/lists/Tasks/tasks, and applies client-side filtering. Returns True with a formatted task list in strMessage on HTTP 200. Returns False with a descriptive error on any failure.

Pass strImportanceFilter = "" to skip the importance filter. Pass blnHasDueFilter = False to skip the due date filter (the value of dtDueOnOrBefore is ignored in that case). Pass blnShowCompleted = True to include completed tasks.

Private functions #

FormatDueDateDisplay — extracts the yyyy-MM-dd date portion from a Graph dateTimeTimeZone dateTime string for display.

Behaviour #

  • Runs as the signed-in user (delegated flow) — retrieves only that user’s own tasks.
  • All tasks are fetched in a single GET request; filtering is applied in VBA after parsing the response with JSONConverter.
  • HTTP 200 OK is the success response.
  • The Tasks alias in the URL resolves to the list with wellknownListName: defaultList.
  • Tasks with no due date set are excluded when the due date filter is active.
  • Completed tasks (status: completed) are excluded by default unless blnShowCompleted = True.
  • Display fields per task: title, status, importance, due date (omitted if not set).
  • An interactive browser sign-in is required on first use or when the cached token has expired.

Notes #

  • No application permissions — Tasks.Read is delegated only.
  • Server-side OData $filter is not used; all filtering is client-side for reliability, as the Graph docs do not confirm $filter support on importance or dueDateTime for this endpoint.
  • Admin consent for Tasks.Read is typically required in organisational tenants.
  • The correct HTTP success code is 200 OK.
  • The Tasks.Read scope is read-only; no tasks are modified by this feature.

VBAuth, developed and maintained by Andrew Richards (The IT Service Ltd) and Peter Bryant (Corylus Business Systems), © 2025–2026. All rights reserved. https://vbauth.com

Updated on April 3, 2026