MS Planner – Plans – Get Plan Task From Task Items
MS Planner – Plans – Get Plan Task From Task Items
Get a Planner plan task from a collection of tasks by id.
Action details
| Property | Value |
|---|---|
| Action label | MS Planner – Plans – Get Plan Task From Task Items |
| Category | CloudTools |
| Apex class and method | GetMSPlannerPlanTaskById.getPlanTaskById |
| Input type | GetMSPlannerPlanTaskById.GetMSPlannerPlanTaskByIdInput |
| Output type | List<MSPlannerTask> |
| Authorization | No connection required; searches an existing collection. |
Prerequisites and permissions
Retrieve the collection first and pass its matching model type. This action performs no callout and needs no connector or Microsoft permissions of its own.
Inputs
| Input | Apex field | Type | Required | Description |
|---|---|---|---|---|
| Id | id | String | Yes | Task id to find |
| Items | items | List<MSPlannerTask> | Yes | Tasks to search |
Outputs
Returns one result for each request, preserving order. A missing match, blank ID, null collection, or null request yields null. A null or empty request list returns a single null element. The helper selects the first non-null item whose id matches.
| Output | Apex field | Type | Description |
|---|---|---|---|
| Id | id | String | Planner task identifier |
| Plan Id | planId | String | Planner plan identifier |
| Bucket Id | bucketId | String | Planner bucket identifier |
| Title | title | String | Planner task title |
| Order Hint | orderHint | String | Sort hint used by Planner |
| Assignee Priority | assigneePriority | String | Assignee priority sort hint |
| Percent Complete | percentComplete | Integer | Completion percentage 0-100 |
| Priority | priority | Integer | Planner priority value |
| Has Description | hasDescription | Boolean | Whether task has description details |
| Conversation Thread Id | conversationThreadId | String | Conversation thread identifier |
| Created Date Time | createdDateTime | String | Created timestamp |
| Start Date Time | startDateTime | String | Start timestamp |
| Due Date Time | dueDateTime | String | Due timestamp |
| Completed Date Time | completedDateTime | String | Completion timestamp |
| Preview Type | previewType | String | Preview type (for example, automatic) |
| Reference Count | referenceCount | Integer | Reference count |
| Checklist Item Count | checklistItemCount | Integer | Checklist item count |
| Active Checklist Item Count | activeChecklistItemCount | Integer | Active checklist item count |
| OData Type | odataType | String | OData type |
| OData ETag | odataEtag | String | OData etag |
| Additional Properties | additionalProperties | List<DynamicObject> | Additional data returned by query |
Behavior and limits
plannerAssignments is a public map on the Apex model, not a global invocable field. It is not a subscriber Apex/Flow output. LWC results expose plannerAssignmentsJson as a serialized assignment map.
Use in Flow
Add MS Planner – Plans – Get Plan Task From Task Items in Flow Builder. Pass a previously retrieved collection and the ID to find. Check the returned item for null before using it.
Use in custom Apex
This subscriber-org example uses the Apptigent namespace. Replace the placeholders and check empty or null results. No callout context is needed.
Apptigent.GetMSPlannerPlanTaskById.GetMSPlannerPlanTaskByIdInput request =
new Apptigent.GetMSPlannerPlanTaskById.GetMSPlannerPlanTaskByIdInput();
request.id = 'REPLACE_WITH_ID';
request.items = new List<Apptigent.MSPlannerTask>{ /* previously retrieved items */ };
List<Apptigent.MSPlannerTask> results =
Apptigent.GetMSPlannerPlanTaskById.getPlanTaskById(
new List<Apptigent.GetMSPlannerPlanTaskById.GetMSPlannerPlanTaskByIdInput>{ request }
);
System.debug(results);
Use in a Lightning Web Component
This collection helper is not exported by msPlannerConnectorLib. For an existing JavaScript collection, use items.find(item => item && item.id === id) || null. This does not call Microsoft Graph.
Error handling and troubleshooting
| Symptom | What to check |
|---|---|
| Missing match | Check the ID and collection type; a null match is expected when no item exists. |