11

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.

  • Try using inside Sprequestexecutor JS this would get you out of cross domain but you have to figure it out for authentication – Shiva Apr 2 '15 at 10:36
2

Something that might work instead is to click the App Launcher and click the dots and pinning the mail app to the nav bar. This has been helpful in that no matter where you are in O365, you can see if you have unread mail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.