0

I want to know how to create task in Planner plan using Microsoft Graph API. Now I'm trying to crate task in planner plan using "Create task" API, but I got UnknownError.

{
    "error": {
        "code": "UnknownError",
        "message": "",
        "innerError": {
            "request-id": "2303b87d-fb0c-431c-9336-c93908758d25",
            "date": "2016-06-28T10:16:56"
        }
    }
}

As the document described I posted to api like this.

POST https://graph.microsoft.com/beta/tasks
Content-type: application/json
Content-length: 192
{
  "assignedTo": "<I set my uuid>",
  "planId": "<I set planId which I created>",
  "bucketId": "<I set bucketId which is included the plan>",
  "title": "test4",
  "orderHint": "A"
}

Any ideas where I'm going wrong? If you know how to add task in Planner plan, please would you share the idea?

2 Answers 2

1

The api was updated recently Masayuki - with new endpoints. I think the main issue with your code though is that orderHint should be " !" which adds at the start. You don't actually set an orderHint as such - but set how your new task relates to existing ones. New documentation on the Microsoft Graph site and linked from my blog post below.

The current beta endpoint should also now be https://graph.microsoft.com/beta/planner/tasks

Take a look at my latest blog post which has a script attached that walks through steps like these. https://blogs.msdn.microsoft.com/brismith/2017/04/17/planner-cloning-a-plan-with-multiple-assignments/

Best regards, Brian

Sign up to request clarification or add additional context in comments.

1 Comment

thank you very much Brian. I'll check updated api and call again.
0

I've tried to reproduce this in Fiddler (with planId, bucketId, and assignedTo values of my own), but the call, as you construct it here, works for me. Are you still having this problem?

Would you be able to pass along the Fiddler trace of a call that doesn't work?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.