README Planner Tasks #
Overview #
Retrieves all Microsoft Planner tasks currently assigned to the signed-in user, across all plans they have access to, via two sequential Graph API calls. Authentication is via OAuth2 with MFA support using VBAuth.dll. The first call returns the task list; the second resolves the plan name for each unique plan referenced. Plan names are cached locally to avoid duplicate lookups within a single retrieval.
Fields displayed per task: title, plan name, due date, priority (mapped from numeric to Urgent/Important/Medium/Low), and percentage complete.
Office apps #
- Access (tested M365)
- Excel (untested M365)
Required components #
- VBAuth.dll v1.x
- modVBAuthGlobalConstants.bas (from /shared)
- modListPlannerTasks.bas (this module)
Azure Entra App Registration #
Delegated permissions:
- Tasks.Read
One app registration covers both AppIDs. Admin consent is required before users can authenticate.
Note: Microsoft Planner APIs support delegated permissions only — application permissions are not supported. The module must always run in the context of a signed-in user.
VBAuth Admin Table – Required Values #
AppID=23 — List My Tasks #
| Column Name | Required Value / Example | Notes |
|---|---|---|
| AppID | 23 | Identifies this feature’s configuration record (List My Tasks) |
| ActionName | VBAuth – Planner Tasks (My Tasks) | Display 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 — shared registration with AppID=24 |
| ScopeClaims | Tasks.Read | Comma-separated Graph scopes — shared registration with AppID=24 |
| Verb | GET | HTTP method |
| URLPart1 | https://graph.microsoft.com/v1.0/me/planner/tasks | Graph endpoint |
| URLParameter1 | NO VALUE REQUIRED | Not used |
| URLPart2 | NO VALUE REQUIRED | Not used |
| URLParameter2 | NO VALUE REQUIRED | Not used |
| URLPart3 | NO VALUE REQUIRED | Not used |
| WaitForLogin | 60 | Seconds — NB MSXML2 timeout parameters are in milliseconds |
AppID=24 — Get Plan Title #
| Column Name | Required Value / Example | Notes |
|---|---|---|
| AppID | 24 | Identifies this feature’s configuration record (Get Plan Title) |
| ActionName | VBAuth – Planner Tasks (Get Plan) | Display name — any value acceptable |
| ClientID | (your App Client ID) | GUID from Azure App Registration Overview blade — same registration as AppID=23 |
| TenantID | (your Tenant ID) | GUID from Azure App Registration Overview blade — same as AppID=23 |
| ObjectID | (your Object ID) | Set by PopulateMissingObjectIDs — same as AppID=23 |
| ScopeClaims | Tasks.Read | Comma-separated Graph scopes — shared registration with AppID=23 |
| Verb | GET | HTTP method |
| URLPart1 | https://graph.microsoft.com/v1.0/planner/plans/ | Base endpoint — plan ID is the final path segment |
| URLParameter1 | Plan ID from AppID=23 response | GUID — passed as strParam1 to SetEntraAPPIdValues at runtime |
| URLPart2 | NO VALUE REQUIRED | Not used |
| URLParameter2 | NO VALUE REQUIRED | Not used |
| URLPart3 | NO VALUE REQUIRED | Not used |
| WaitForLogin | 60 | Seconds — NB MSXML2 timeout parameters are in milliseconds |
Module: modListPlannerTasks.bas #
Public functions #
Public Function ListPlannerTasks( _
ByRef strResult As String, _
ByRef strMessage As String) As Boolean
Code language: JavaScript (javascript)
Acquires a bearer token for AppID 23 (Tasks.Read), calls GET /me/planner/tasks, then for each unique planId in the results calls AppID 24 to retrieve the plan title. Plan titles are cached in local arrays to avoid duplicate HTTP calls. Returns True on success. strResult receives the formatted display text. strMessage receives a summary on success or error description on failure.
Private functions #
SafeString(objItem, strKey)— returns a string field from a parsed JSON Dictionary, returning""for absent fields without error.SafeInteger(objItem, strKey)— returns an integer field, returning -1 for absent fields without error.PriorityText(intPriority)— maps the Graph numeric priority value to a display string. Graph uses 0=Urgent, 1=Important, 5=Medium, 9=Low; intermediate values (2-4, 6-8) map to the nearest named level.GetPlanTitle(strPlanID)— calls AppID 24 for a given plan ID using the already-acquired bearer token, and returns the plantitlefield.
Behaviour #
- Runs as the signed-in user (delegated permissions only — Planner does not support application permissions).
- HTTP 200 is the success code for both calls.
- The bearer token acquired for AppID 23 is reused for all AppID 24 calls — no re-authentication occurs mid-run.
- If
GET /me/planner/tasksreturns zero tasks (emptyvaluearray or absentvaluekey), the result displays a “no tasks assigned” message rather than an error. - Authentication is interactive on first run; subsequent calls within the session reuse the cached token.
- Plan lookups are cached within a single run (up to 50 unique plans). Each unique plan causes one additional HTTP call; a user with tasks in many plans will experience a slight delay.
Notes #
Tasks.Readis the minimum delegated scope for both endpoints.- Admin consent is required before users can authenticate.
- This feature returns tasks assigned to the signed-in user in Planner — it does not return Microsoft To Do tasks (those use the
/me/todoendpoint and are covered by tabs 5 and 6). - The
percentCompletefield is an integer 0-100. A value of 100 means the task is complete but it will still appear in results — Planner does not automatically remove completed tasks fromGET /me/planner/tasks. dueDateTimeis returned in ISO 8601 UTC format; only the date portion (yyyy-mm-dd) is displayed.
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