2

I'm using the beta Microsoft Graph API, to create tasks in the Planner.

As part of the create task we use the task details to update the task with links, using the externalReferenceCollection see http://graph.microsoft.io/en-us/docs/api-reference/beta/resources/externalreferencecollection

and http://graph.microsoft.io/en-us/docs/api-reference/beta/api/taskdetails_update, the documentation specifically states that:

"In this case, the client must provide valid URLs based on the HTTP/HTTPS protocols as properties and their values must be the externalReference objects. Based on OData, property names in Open Types cannot contain the following characters: ., :, % so they need to be encoded. " I do encode the specified values but the # within the URL causes an error.

An example using REST URI to update the task details is:

https://graph.microsoft.com/beta/tasks/S1VywG4fe0q2qCoMRmjYYpYAJh9q/details

and the content body JSON is:

{"description": "My Task Title description 1", "previewType": "description" , "references": { 
"https%3A//dashboard-me%2Ec9users%2Eio/#/edit/342f13159eaf1a":
{
"@odata.type": "#microsoft.graph.externalReference",
"alias": "Edit link",
"type": "Other" 
} }}

As can be seen above the the item "https%3A//dashboard-me%2Ec9users%2Eio/#/edit/342f13159eaf1a" contains a # in the URL, removing the # allows the update to work, when the # is there the update fails with a BadRequest (400) and the following:

{
"error": {
"code": "",
"message": "The request is invalid.",
"innerError": {
"request-id": "65d98658-16a2-4525-850e-6a0aee382c97",
"date": "2016-07-23T10:44:44"
}
}
}

I've raised this with Microsoft and was advised by them to also post here.

Many thanks

Terry

2 Answers 2

0

This is a case we did not handle. Thank you for pointing it out! We will make a fix and provide an update when available.

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

Comments

0

Seems like there is a bug in the API. I've opened a case with MS because I get the same result when updating only the detail field.

Here's the error I receive:

Getting: { "error": { "code": "", "message": "The request is invalid.", "innerError": { "request-id": "4a1ea6d4-3a0c-47cf-92d2-577aaa9da253", "date": "2016-12-29T15:39:09" } } }

Do you have the issue all the time?

I will update as soon as I get a response.

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.