How to implement claims based authentication for Office Excel App RRS feed

  • General discussion

  • Hi,

    I have an Office Excel app communicating with Azure SQL database through a WCF service hosted in Azure. How can I implement ADFS authentication and authorization for the App?



    Thursday, April 11, 2013 6:12 PM

All replies

  • Tuesday, April 16, 2013 1:20 PM
  • Thanks Yuri. The link shows how to do it using C#. Since I am calling WCF service through office excel task pane app, I am using jQuery for that. How can I create the WCF call with the security token through jQuery? I am new to building office apps and also working with java script for the first time. So this might be a basic question but alternatively, is there a way by which I can have the call made from C# and then pass the response data to java script for data binding? Or is there a way by which I can achieve Matrix or Table binding through c# itself? If binding is possible through C# then I can implement the service call using security token as shown in the link that you provided.
    Wednesday, April 17, 2013 10:57 PM
  • Look at this thread http://social.msdn.microsoft.com/Forums/en-US/appsforoffice/thread/bef0f773-466b-4a79-adc8-62b6623e8f9f for how to set request headers with jquery ajax.

    For a proxy solution that you describe, you can make an ajax call to your web serivec and then in web service do what you need and return result. The above link should show you how a simple ajax call is done in jquery. For more information about ajax calls in jquery look here . It should look something like this

      type: "POST",
      contentType: "application/json; charset=utf-8",
      url: "WebService.asmx/WebMethodName",
      data: "{}",
      dataType: "json"

    If it is a cross domain web service call then you need to either go by CORS standards (IE10 or orther browsers / older IEs dont support it)  or use dataType: 'jsonp' .

    Anze Javornik

    Wednesday, April 17, 2013 11:37 PM