locked
How to call SharePoint Online 2013's REST API from Windows 8 HTML5 App?

    Question


  • Hi

    I am developing a Windows 8 HTML5\WinJS app that should communicate with SharePoint Online 2013 via it

    s REST services.

    I know how to use the API, but I don't know how to authenticate against a REST service from Javascript (WinJS)?
    Wednesday, September 19, 2012 1:15 PM

Answers

  • Hi Dave, 

    Since I haven't found any solution for a client side authentication ,  I used this great article by Wictor Wilén explaining how to do active authentication to Office 365 and SharePoint Online using WCF.

    Thanks,

    Alex. 

    • Marked as answer by Alex Choroshin Sunday, September 30, 2012 8:31 PM
    Sunday, September 30, 2012 8:31 PM

All replies

  • I believe that this sample will show you how to authenticate.  It is not using the SharePoint REST Services, but it should be a very similar implementation:

    http://code.msdn.microsoft.com/windowsapps/Windows-account-authorizati-7c95e284/sourcecode?fileId=63987&pathId=1713588077


    Dave Paquette @Dave_Paquette www.davepaquette.com

    Wednesday, September 19, 2012 2:11 PM
  • Hi Dave,

    thanks for the quick replay.

    SharePoint online uses claims based authentication and this example uses live id authentication so it doesn't really help me,

    any other ideas?

    Thanks.

    Alex.

    Wednesday, September 19, 2012 3:31 PM
  • Sorry I don't have any other ideas, but I am interested in hearing the solution to this.

    Dave Paquette @Dave_Paquette www.davepaquette.com

    Wednesday, September 19, 2012 4:30 PM
  • Hi Dave, 

    Since I haven't found any solution for a client side authentication ,  I used this great article by Wictor Wilén explaining how to do active authentication to Office 365 and SharePoint Online using WCF.

    Thanks,

    Alex. 

    • Marked as answer by Alex Choroshin Sunday, September 30, 2012 8:31 PM
    Sunday, September 30, 2012 8:31 PM
  • Hi,

    I am facing a problem. I am having a Window 8.1 App, which was developed with c#, XAML. Now I am planning to put my Data in SharePoint Online.

    I searched and found out that Wictor solution I can use for Authentication. Now the problem is we can not use Wictor solution [http://www.wictorwilen.se/Post/How-to-do-active-authentication-to-Office-365-and-SharePoint-Online.aspx] directly as it is build upon .Net freamwork . and Metro Apps are build upon .NetCore.

    What I can do here is to use WCF service and have whole Wictor solution in that WCF service than I can call this WCF service from my Window App. this is working fine.

    But I want to know Is there are other options available if I don't want to deploy this WCF separately. In future I have to publish this Win App on window store. 

    Any help will be appreciated.

    Friday, March 14, 2014 2:42 PM
  • Hi GirishMeena,

    I'm curious to know if you've found a different solution to do this?

    Thanks in advance

    Martin

    Thursday, December 18, 2014 8:38 AM