Microsoft Teams : “Failed to create the plan” error while adding Planner to Teams which are created using Graph APIs

Failed to add planner in Teams

Hi All,

LIFE IS BEAUTIFUL 🙂 I hope we all are safe:) STAY SAFE, STAY HEALTHY 🙂 STAY HOME 🙂

Today new issue and solution 🙂

Background / Use Case : We were provisioning Teams using Microsoft Graph APIs. We have our custom Teams creations form where user can order the Team.

We have following code: This is simple code. There are other settings as well while creating Groups.

With this code we are successfully able to create group and then Teams. Everything is working fine with Team either from Team desktop client or Team Web client.

But issue occurs when one of the owner of one team tried to add the Planner as

Microsoft Teams : Adding Planner to the Team which are created using Microsoft Graph APIs
Fig1: Microsoft Teams : Adding Planner to the Team which are created using Microsoft Graph APIs

And then error occurs – “Failed to create the plan.” as

Microsoft Teams : Adding Planner to the Team which are created using Microsoft Graph APIs - Error - "Enable to create the plan"
Fig2 : Microsoft Teams : Adding Planner to the Team which are created using Microsoft Graph APIs – Error – “Enable to create the plan”

This error is in both in Teams desktop client and Team web client as well.

When we created the Teams from UI either through Teams desktop client or Teams web client, we are successfully able to add the Planner. So it seems this is the issue when we are creating Teams using Graph APIs.

After bit googling it found that this seems to be known issue and lots of colleagues has this issue. Following are few threads for such error for reference: https://delucagiuliano.com/microsoft-teams-failed-to-create-the-plan

https://stackoverflow.com/questions/59472710/microsoft-groups-teams-cant-create-plans-for-planner-app

https://github.com/microsoftgraph/microsoft-graph-docs/issues/7427

There is a user voice for the same as well – https://microsoftteams.uservoice.com/forums/908686-bug-reports/suggestions/39626701-planner-failed-to-create-plan

Solution: But then there is workaround as well 🙂 And workaround is “Adding Owner as a Member as well” . When I changed the code and added Owners as a Members as well it worked like a charm 🙂

Updated code: In above code added following line, added Owners as a Members as well –

After adding the above line, tested by creating new Teams and then owners could successfully add the Planner 🙂 But then this works for new Teams, for existing Teams we need to write a script – so the next article, shearing the script soon 🙂

Few more referenceshttps://docs.microsoft.com/en-us/graph/api/team-put-teams?view=graph-rest-1.0&tabs=csharp

Creating a Teams Programmatically

Create Plan Failed when creating Planner in Microsoft Teams

How to resolve ‘Failed to create Plan’ from Microsoft Teams

Thanks for reading 🙂 If its worth at least reading once, kindly please like and share. SHARING IS CARING 🙂

Enjoy the beautiful life 🙂 Have a FUN 🙂 HAVE A SAFE LIFE 🙂 TAKE CARE 🙂

One thought on “Microsoft Teams : “Failed to create the plan” error while adding Planner to Teams which are created using Graph APIs

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: