Assembling Azure, Office 365, and Web Services into a real app

Play Assembling Azure, Office 365, and Web Services into a real app

The Discussion

  • User profile image
    CraigBarrie

    Hi,

    This looks exactly what I need for a project I'm working on - *but*....

    I've tried to replicate the demo, but I can't seem to access the Microsoft.Office365.Exchange Namespace.  I can connect fine to Azure to assign permissions to the application, but I don't see the sample code get generated like it does in your demo.   

    Copying the code in the video isn't a problem until If I try to reference  Microsoft.Office365.Exchange  and then I get the message 

    "The type or namespace name 'ExchangeClient' could not be found (are you missing a using directive or an assembly reference?)"

    Some guidance would be appreciated - or even better, if you could upload the sample shown, that would be great

    Thanks :D

  • User profile image
    Mat Velloso

    Hi there,

    I assume from your message that you're using Visual Studio and writing .Net code? If so, you probably want to install the O365 tools for Visual Studio: https://visualstudiogallery.msdn.microsoft.com/7e947621-ef93-4de7-93d3-d796c43ba34f

    This will give you the right-click, add connected service functionality I used in the video.

    Cheers,
    Mat

  • User profile image
    MatVelloso

    There's not really a sample because everything there is generated out of Visual Studio. Once you install the O365 API tool for Visual Studio, everything should work. Let me know if that doesn't do the trick for some reason.

     

     

  • User profile image
    CraigBarrie

    Hi Matt,

    Thanks for the quick reply!

    I'm using VS 2013 Pro + already had the O365 API tool installed.  Do you have any other ideas that would help to get this working for me please?

    thanks

  • User profile image
    MatVelloso

    Craig, I just spoke with the team:

    The newest tools for Visual Studio don't generate that sample snippet anymore. They felt it would be wiser to instead create a nice sample app and point people to it: https://github.com/OfficeDev/Office-365-APIs-Starter-Project-for-ASPNETMVC">https://github.com/OfficeDev/Office-365-APIs-Starter-Project-for-ASPNETMVC There are several samples over that site: https://github.com/OfficeDev/

  • User profile image
    CraigBarrie

    Hi Matt,

    Thanks for taking the time to look into this issue.

    I've taken a look at the samples and I can get them to work - however, I currently need this to work in a non MVC project.  The sample you provided in the video was only 6 lines of code and you could get your email messages.  I thought  - Awesome - exactly what I need, but now less than 24 hours after your video has been posted, it seems that way of doing it is out of date!

    Although the sample MVC app is comprehensive - it's also way more complicated.  I'm afraid I have to question whether it was a wise decision to remove the auto generated sample, because it was a great hello world example + looked like (at least on the face of it) like it could be implemented outside of an MVC application very easily.

    Is there any possibility of getting a sample app out onto github that's as easy to understand as what you've demonstrated in your video?

    Thanks

     

     

     

     

     

     

     

     

  • User profile image
    MatVelloso

    Craig, drop me an e-mail on mat.velloso@microsoft.com and lets discuss this further. First thing I need to understand is what kind of app is this. You mentioned this is not an MVC app. I assume it's still ASP.Net so is this a Web Forms app? Visual Studio can add all authentication out of the box for you so the only code you will need to add is the calls to O365 which should be just a few lines of code still.

  • User profile image
    panjkov

    @CraigBarrie:Hi Craig,

    please check out OfficeDev repo on GitHub  http://gihtub.com/officedev for starter projects and http://dev.office.com/code-samples for comprehensive list of code samples where you can find not only asp.net but also Windows Store, Xamarin, Cordova...

    There is also a nice intro article on ITUnity which explains basic way of programming against O365 APIs from scratch http://www.itunity.com/article/programming-office-365-apis-general-availability-release-678

     

  • User profile image
    Rob Denham

    Hi Mat,

    I've dropped you an email - I'm a a colleague of Craigs, regarding the issue we're having. If you could take a quick look then that'd be appreciated.

    Thanks

  • User profile image
    guillaumeo

    Hi,

    This API works perfectly for web projects. Is it possible to leverage those REST API from a WCF service for synchronizing some data to an O365 site ?
    Thanks,

  • User profile image
    MatVelloso

    guillaumeo, can you elaborate on what the scenario is? Do you want to hardcode a username/password in your service or have some UI that authenticates the user to call this service?

    For hardcoded username/passwords you can use ADAL's headless authentication (http://www.cloudidentity.com/blog/2014/07/08/using-adal-net-to-authenticate-users-via-usernamepassword/).

    But if you have a web UI that authenticates the user and then calls this service I'd suggest making it into a REST/Web API simply because it will make your life so much easier. I might be able to provide more help once I learn more about what you are trying to build there.

    Mat

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.