This worked for me but it's in Powershell.
Connect-MgGraph
Import-Module Microsoft.Graph.Beta.Planner
$params = @{
container = @{
#beta graph url of the user to associate the plan to
url = "https://graph.microsoft.com/beta/users/12345678-abcd-1234-abcd-abcd1234efg"
}
title = "titleOfPlan"
}
New-MgBetaPlannerPlan -BodyParameter $params
Disconnect-MgGraph
If I gave it a container type as Simon did, I got the same error. My guess is that the container is already defined with a type for users though the container type for my user container is "unknownFutureValue".
I'd say to Eugéne, make sure you're posting to the graph beta (https://graph.microsoft.com/beta/planner/plans) API endpoint as well as using the beta user url in the JSON.
I'd say to Simon, drop the
,
"type": "user"
of yours.