locked
Which API to Connect to get free/busy information of a user from Office 365 RRS feed

  • Question

  • Hi Team,

    Can you please let me know which EWS API or which version of EWS API I can use to get free/busy of a particular user from Office 365... currently I am using EWS 1.2 API to get free/busy of user from On premise Exchange 2010_SP3..Is is possible to use EWS 1.2 API to get free/busy information from Office 365....If we can use EWS 1.2 API what is the Exchange Version I need to target to get the free/busy information(Eg: Like we target Exchange2010_SP2 for both Exchange2010_SP2 and Exchange2010_SP3)... Also can you please let me know how active directory users can be retrieved from Office 365...

    Thanks and Regards,

    Anuj Jain

    Tuesday, July 21, 2015 5:34 AM

Answers

All replies

  • Office365 provides Exchange Web Services the same as an OnPremise Exchange server, EWS is generally backwards compatible so whatever code your using OnPrem will work fine against Office365. To get the Office365 EWS endpoint you just use Autodiscover as you would onPrem (or you can just use the load balanced URL https://outlook.office365.com/EWS/Exchange.asmx ).

    >> Is is possible to use EWS 1.2 API to get free/busy information from Office 365

    Yes but I would suggest you update to the latest version (EWS requests are backwards compatible)

    >> If we can use EWS 1.2 API what is the Exchange Version I need to target to get the free/busy information(Eg: Like we target Exchange2010_SP2 for both Exchange2010_SP2 and Exchange2010_SP3)

    Its important to understand the difference between Version and Schemas I would suggest reading https://msdn.microsoft.com/en-us/library/office/dn741586(v=exchg.150).aspx

    >>Also can you please let me know how active directory users can be retrieved from Office 365

    You can either use the Exchange Management Shell cmdlets in Managed code using something like https://msdn.microsoft.com/en-us/library/office/ff326159(v=exchg.150).aspx . Or you can the Graph API see https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/users-operations#GetUsers although I would suggest you use the Client library http://blogs.msdn.com/b/aadgraphteam/archive/2014/12/12/announcing-azure-ad-graph-api-client-library-2-0.aspx which makes things pretty easy.

    Cheers
    Glen

    • Marked as answer by Anuj0801 Wednesday, July 22, 2015 7:55 AM
    • Unmarked as answer by Anuj0801 Wednesday, July 22, 2015 9:21 AM
    • Marked as answer by Anuj0801 Thursday, July 23, 2015 8:13 AM
    Wednesday, July 22, 2015 4:47 AM
  • Hi Glen,

    Thank you so much for the response... Can you please let me know which Exchange Version I need to target when calling EWS 1.2 API to get free/busy information from Office 365......When i try to connect as https://outlook.office365.com/EWS/Exchange.asmx  and give my credentials and pass Exchange2010_SP2 as ExchangeVersion to connect to Office 365 I am getting Connection timeout. Also when i try to ping outlook.office365.com from command promt it says destination host unrechable...

    Any help is greatly appreciated

    Thanks,

    Anuj Jain

    Wednesday, July 22, 2015 9:32 AM
  • Using Exchange2010_SP2 will work fine against Office365 your just telling the server what schema to support you really need to read https://msdn.microsoft.com/en-us/library/office/dn741586(v=exchg.150).aspx

    >>Connection timeout. Also when i try to ping outlook.office365.com from command promt it says destination host unreachable

    That sounds like you have a network issue as that isn't normal and not a code issue my suggestion would be try connecting from another network and talk to your network guys.

    Cheers
    Glen

    • Marked as answer by Anuj0801 Thursday, July 23, 2015 8:13 AM
    Wednesday, July 22, 2015 10:52 PM