locked
Call sharepoint and exchange rest api from a mail app in 365 RRS feed

  • Question

  • Hi!

    I need to access a mail items attachments and upload them to sharepoint 365.

    How can I do this with javascript and rest api/ office 365 preview.

    Can someone give me a code example for this. Authentication -> Rest call to get attachments - > Rest call ti upload attachements to sharepoint

    Thanks!

    Thursday, September 18, 2014 9:22 AM

Answers

  • Hi Toniman2,

    You can see the example that Luna referred to, that shows a mail app getting item attachments:

    How to: Get attachments of an Outlook item from an Exchange server

    You can see a presentation at the Microsoft Exchange Conference of another example that saves item attachments to OneDrive for Business here (around 28:14min):

    http://channel9.msdn.com/Events/MEC/2014/EXT302

    The sample code is posted here:

    https://github.com/OfficeDev/Outlook-Power-Hour-Code-Samples

    Cheers,

    Angelgolger

    Senior Content Developer

    Monday, September 22, 2014 5:52 AM
    Answerer
  • Hi,

    According to your description, I think you want to get attachments of Outlook mail items from Exchange server and call SharePoint rest API to upload the attachments.

    Here is an article about using a mail app to enable a service to get attachments from an Exchange server.

    How to: Get attachments of an Outlook item from an Exchange server

    Here is an article about uploading a local file to a SharePoint folder by using the REST API and jQuery AJAX requests.

    How to: Upload a file by using the REST API and jQuery

    In fact, calling SharePoint rest API with JavaScript is not related to development of Mail App. If the article above cannot help you, I suggest you posting in Developing App for SharePoint forum for more effective responses.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 19, 2014 8:45 AM

All replies

  • Hi,

    According to your description, I think you want to get attachments of Outlook mail items from Exchange server and call SharePoint rest API to upload the attachments.

    Here is an article about using a mail app to enable a service to get attachments from an Exchange server.

    How to: Get attachments of an Outlook item from an Exchange server

    Here is an article about uploading a local file to a SharePoint folder by using the REST API and jQuery AJAX requests.

    How to: Upload a file by using the REST API and jQuery

    In fact, calling SharePoint rest API with JavaScript is not related to development of Mail App. If the article above cannot help you, I suggest you posting in Developing App for SharePoint forum for more effective responses.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 19, 2014 8:45 AM
  • Hi Toniman2,

    You can see the example that Luna referred to, that shows a mail app getting item attachments:

    How to: Get attachments of an Outlook item from an Exchange server

    You can see a presentation at the Microsoft Exchange Conference of another example that saves item attachments to OneDrive for Business here (around 28:14min):

    http://channel9.msdn.com/Events/MEC/2014/EXT302

    The sample code is posted here:

    https://github.com/OfficeDev/Outlook-Power-Hour-Code-Samples

    Cheers,

    Angelgolger

    Senior Content Developer

    Monday, September 22, 2014 5:52 AM
    Answerer