[Graph Beta - Planner] - Limit to number of maximum pinned/favorited plans ignored by REST API
The Graph REST API endpoints to add a Planner as a Pinned/Favorite plan for a user enforce a limit on the maximum number of plans allowed. If you exceed this limit, the API correctly returns a 403 Forbidden status code with the error message "MaximumFavoritePlansForUser"
Despite this, the endpoint will still actually add the planner to the users favorites
Sample flow
identify a Plan ID to add as a user Pinned Plan
call [PATCH] https://graph.microsoft.com/beta/users/{{MyEmail}}/planner to add the plan as a user favorite with a request body of
{
"favoritePlanReferences": {
"{{PlanID}}": {
"@odata.type": "#microsoft.graph.plannerFavoritePlanReference",
"orderHint": " !",
"planTitle": "Task Planner Testing - 10/10/2024"
}
}
}
Result: 403 return with MaximumFavoritePlansForUser error
Next call
[GET] https://graph.microsoft.com/beta/users/{{MyEmail}}/planner
Result: the responses favoritePlanReferences
property will list the plan ID that was pinned in the request that received the 403 status code
Expected: The Plan was not added