none
Office365 API : Windows 8.1 samples do not build, AuthenticationHelper class has errors RRS feed

  • Question

  • just downloaded latest Office365 API samples for Windows 8.1 Store apps from http://dev.office.com/code-samples-detail/1511

    Alas I get the following build errors, even after having updated all nuget packages to their latest versions:


    Office365Samples\Office365StarterProject\Helpers\AuthenticationHelper.cs(156,44,156,63): error CS1061: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext' does not contain a definition for 'UseCorporateNetwork' and no extension method 'UseCorporateNetwork' accepting a first argument of type 'Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext' could be found (are you missing a using directive or an assembly reference?)
    Office365Samples\Office365StarterProject\Helpers\AuthenticationHelper.cs(341,28,341,87): error CS1502: The best overloaded method match for 'Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.AcquireTokenAsync(string, string, Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential)' has some invalid arguments
    Office365Samples\Office365StarterProject\Helpers\AuthenticationHelper.cs(341,76,341,86): error CS1503: Argument 3: cannot convert from 'System.Uri' to 'Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential'
    Office365Samples\Office365StarterProject\Helpers\AuthenticationHelper.cs(343,24,343,30): error CS1061: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult' does not contain a definition for 'Status' and no extension method 'Status' accepting a first argument of type 'Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult' could be found (are you missing a using directive or an assembly reference?)
    Office365Samples\Office365StarterProject\Helpers\AuthenticationHelper.cs(343,34,343,54): error CS0103: The name 'AuthenticationStatus' does not exist in the current context

    Building with VS2013 Update 4

    What am I doing wrong? Is latest nuget of Microsoft.IdentityModel.Clients.ActiveDirectory.* perhaps breaking it?

    PS is there an Office365 API forum on MSDN? If not, might be interesting to create one?

    edit:

    in case it helps: here is the list of nuget packages in the solution:

    <?xml version="1.0" encoding="utf-8"?>
    <packages>
      <package id="Microsoft.Azure.ActiveDirectory.GraphClient" version="2.0.5" targetFramework="win81" />
      <package id="Microsoft.Data.Edm" version="5.6.3" targetFramework="win81" />
      <package id="Microsoft.Data.OData" version="5.6.3" targetFramework="win81" />
      <package id="Microsoft.Data.Services.Client" version="5.6.3" targetFramework="win81" />
      <package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="3.0.110281957-alpha" targetFramework="win81" />
      <package id="Microsoft.OData.Client" version="6.9.0" targetFramework="win81" />
      <package id="Microsoft.OData.Core" version="6.9.0" targetFramework="win81" />
      <package id="Microsoft.OData.Edm" version="6.9.0" targetFramework="win81" />
      <package id="Microsoft.Office365.Discovery" version="1.0.22" targetFramework="win81" />
      <package id="Microsoft.Office365.OAuth.Windows" version="1.0.22" targetFramework="win81" />
      <package id="Microsoft.Office365.OutlookServices" version="1.0.22" targetFramework="win81" />
      <package id="Microsoft.Office365.SharePoint" version="1.0.22" targetFramework="win81" />
      <package id="Microsoft.Spatial" version="6.9.0" targetFramework="win81" />
      <package id="Newtonsoft.Json" version="6.0.8" targetFramework="win81" />
      <package id="System.Spatial" version="5.6.3" targetFramework="win81" />
    </packages>

    • Edited by wolkenjager Friday, January 30, 2015 5:10 PM
    Friday, January 30, 2015 4:59 PM

Answers

  • Hello wolkenjager,

    This sample has not been updated to use this version of ADAL. As you suggest, the version you have specified appears to break the sample. We thank you for trying this out! :) We suggest that you revert to the version specified in the packages.config (2.10.10910.1511).

    With regards,

    Michael Mainer


    Michael | Microsoft Exchange Developer Content

    The Exchange Development Forum Guide has useful information for using the Exchange Development Forum.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Marked as answer by wolkenjager Saturday, January 31, 2015 5:13 PM
    Saturday, January 31, 2015 3:28 PM