As part of a project whose aim is th notably improve the visual side of a SharePoint Online site I'm a bit stuck.
On the home page in the left banner users want to see the number of unread messages they have in Office365 .
The problem is: I created an area in the master page to put the result. I thought the Rest API used to do this :
$.ajax ({
type: "GET "
url: " https://outlook.office365.com/ews/odata/Me/Folders/Inbox "
dataType : " json "
success : function (resp ) {
// And count unread message
} ,
error : function ( e) {
alert (' Error121212 :' + JSON.stringify ( e));
}
} )
Unfortunately I get a cross domain error. I tried with jsonp
but it does not work either:
Uncaught syntax error unexpected token.
Can you please tell me if this is a good practice? I feel that anyways I must find a technique for authentication.
(In the case of jsonp I have a popup that asks me authentication and then pb occurs on callback apparently). I want to avoid developing a type requiring a typical deployment Wsp.