MS Planner – Plans – Get A Plan From Plan Items
MS Planner – Plans – Get A Plan From Plan Items
Get a Planner plan from a collection of all plans by id.
Action details
| Property | Value |
|---|---|
| Action label | MS Planner – Plans – Get All Plan From Plan Items |
| Category | CloudTools |
| Apex class and method | GetAllMSPlannerPlanById.getPlanById |
| Input type | GetAllMSPlannerPlanById.GetAllMSPlannerPlanByIdInput |
| Output type | List<MSPlannerPlan> |
| 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 | Plan id to find |
| Items | items | List<MSPlannerPlan> | Yes | Plans 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 plan identifier |
| Title | title | String | Planner plan title |
| Owner | owner | String | Microsoft 365 group identifier that owns the plan |
| Created Date Time | createdDateTime | String | Created timestamp |
| OData Type | odataType | String | OData type |
| OData ETag | odataEtag | String | OData etag |
| Additional Properties | additionalProperties | List<DynamicObject> | Additional data returned by query |
Use in Flow
Add MS Planner – Plans – Get All Plan From Plan 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.GetAllMSPlannerPlanById.GetAllMSPlannerPlanByIdInput request =
new Apptigent.GetAllMSPlannerPlanById.GetAllMSPlannerPlanByIdInput();
request.id = 'REPLACE_WITH_ID';
request.items = new List<Apptigent.MSPlannerPlan>{ /* previously retrieved items */ };
List<Apptigent.MSPlannerPlan> results =
Apptigent.GetAllMSPlannerPlanById.getPlanById(
new List<Apptigent.GetAllMSPlannerPlanById.GetAllMSPlannerPlanByIdInput>{ 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. |