none
Authenticating to Exchange Online

    Question

  • Hi all

    I am creating a Cloud Business App and I want to use Exchange Online to send an email when an entity get's created. Following the "Sending Email from a LightSwitch SharePoint App using Exchange Online" blog post by Beth Massi, I have successfully authenticated and sent the email.

    My problem is that I want to use the current user for authentication - instead of hard coding any username/passwords. I have tried a number of approaches, but none worked. Obviously, DefaultCredentials - and DefaultNetworkCredentials - are out of the question. My hope lies with OAuth Authentication, but I completely clueless on how to proceed.

    I believe what I am trying to achieve is a bit trivial, yet either I am missing something, or it is not as trivial as I think. So, my questions are:

    1. Is what I am trying to do even possible?
    2. If it is, how do I authenticate using the current user to Exchange Online via the Exchange Managed API?

    Thanx in advance for all the ideas / guidance.

     

    Monday, April 14, 2014 11:00 AM

Answers

  • Thanks for your feedback, jpoul.

    For this issue, it's also recommended to consult with Exchange experts about this Exchange authentication issue in Exchange Server forum, and check whether they have good solution for you.

    Best regards

    Angie


    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.

    Wednesday, April 23, 2014 5:32 AM
    Moderator

All replies

  • Hi jpoul,

    I don't try OAuth Authentication with Exchange on my side before, so I don't have good suggestions for this.

    According to your description above, I think you could also consider using Windows Form authentication on your side.

    hope it helps.

    Regards


    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.

    Tuesday, April 15, 2014 8:25 AM
    Moderator
  • Hey Angie,

    Thanx for the reply. Problem is, this is a Cloud Business App, thus authentication in taken care by Office 365 - it is published as a SharePoint App (autohosted or provider-hosted, makes no difference for what I am trying to achieve). So there is no way for me to set this to Windows Authentication.

    Even so, since I am using Exchange Online, Windows Authentication would do no good - unless the Windows account used was the same for Exchange Online, through a configured trust relationship between the on-premise and office 365 domain - and ADFS configured on Office 365.

    In any case, thanks for taking the time to respond to this one. I accidentally voted for your reply, but unfortunately it is not helpful in my case :(

    Thanx again.

     



    • Edited by jpoul Wednesday, April 16, 2014 1:14 AM
    Wednesday, April 16, 2014 1:13 AM
  • Thanks for your feedback, jpoul.

    For this issue, it's also recommended to consult with Exchange experts about this Exchange authentication issue in Exchange Server forum, and check whether they have good solution for you.

    Best regards

    Angie


    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.

    Wednesday, April 23, 2014 5:32 AM
    Moderator