I have the following Ajax call:
var baseurl = Office.context.mailbox.restUrl;
var getMessageUrl = baseurl + "/v2.0/me/messages/" + rest_id + "?$select=SingleValueExtendedProperties&$expand=SingleValueExtendedProperties($filter=PropertyId eq 'String 0x007D')";
$.ajax({
url: getMessageUrl,
dataType: "jsonp",
headers: {
"Authorization": "Bearer " + rest_token,
"Accept": "application/json; odata.metadata=none"
},
error: function (xhr, ajaxOptions, thrownError) {
$('.resultsScore').text(xhr.statusText);
}
}).done(function (item) {
However, this always throws an error (the error function is always entered). If I used dataType: "json", it works fine. What am I doing wrong? Why can I not use jsonp in this way?