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.

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

1 Answer 1

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 and acknowledge you have read our privacy policy.

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