Problem connecting to Sharepoint Online

Aug 1 at 5:31 PM
Edited Aug 2 at 9:21 AM
Hi
This is a fabulous tool, but I am stuck on connecting to SP Online.
DIFS 2.8.0.0 (x64)
Windows 7 (x64)
Office 365/Sharepoint Online

I installed the OleDb drivers and DIFS appears to connect to my Excel file (it only contains 2 rows for testing). Then it tries to connect to SP using my Office365 credentials but fails:
SPImportHelper Information: 1000 : Progress : About to connect to source : 
SPImportHelper Information: 1000 : Progress : Source connected : 
SPImportHelper Information: 1004 : DataSetSource : Fill select * from [files$] where [ImportStatus] = 'Import'
SPImportHelper Information: 1000 : Progress : Source filled : 2 rows loaded
SPImportHelper Information: 1000 : Progress : About to connect to destination : 
SPImportHelper Information: 1019 : Authenticating: Authenticating to url https://xxxxxxxx.sharepoint.com/sites/xxxxxxx-xxxxxxxxxx
SPImportHelper Information: 1020 : Authenticating: Authenticating with username xxxxxxxx@xxxxxxxx.com
SPImportHelper Information: 1021 : Authenticating: Authenticating using ClientAuthenticationMode Default
SPImportHelper Information: 1000 : Progress : Exception during import : Identity Client Runtime Library (IDCRL) could not look up the realm information for a federated sign-in. : Microsoft.SharePoint.Client.Runtime : 
I've tried Googling the error message and checked that the username and password are correct by re-entering them several times and checking that they work in a browser.
I've checked that the URL, path and list names are all correct.

I believe that the XML file is set up correctly. I used "Office 365" on the "Authentication" tab and saved the credentials back to the XML file:
<DataSetImportSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Source>
    <SourceDataSetType>OLEDbTable</SourceDataSetType>
    <OleDbSourceDataSetSettings>
      <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Files\Test.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=0";</ConnectionString>
    </OleDbSourceDataSetSettings>
    <OleDbTableSourceDataSetSettings>
      <TableName>files$</TableName>
    </OleDbTableSourceDataSetSettings>
    <OleDbSelectSourceDataSetSettings />
    <ODBCSourceDataSetSettings />
    <ODBCSelectSourceDataSetSettings />
    <FileSystemFilesDataSetSettings />
  </Source>
  <Destination>
    <AuthenticationSettings>
      <AuthenticationType>Office365</AuthenticationType>
      <domain />
      <username>xxxxxxxx@xxxxxxxx.com</username>
      <encryptedpassed>xxxxxxxxxxxxxxx=</encryptedpassed>
    </AuthenticationSettings>
    <DestinationListSettings>
      <DestinationWebUrlRelative>/sites/xxxxxxx-xxxxxxxxxx</DestinationWebUrlRelative>
      <DestinationFolderUrlRelative>/sites/xxxxxxx-xxxxxxxxxx/XxxXxx</DestinationFolderUrlRelative>
      <DestinationServerUrl>https://xxxxxxxx.sharepoint.com</DestinationServerUrl>
      <DestinationListName>XxxXxx</DestinationListName>
    </DestinationListSettings>
Hope you can help, I guess it's something simple I'm missing but it's stopped me in my tracks!
Aug 2 at 9:20 AM
I tried setting Authentication to "Current" since my SP login uses my Windows credentials. This time authentication seems to work(?) but now I get a 403 error:
SPImportHelper Information: 1000 : Progress : About to connect to source : 
SPImportHelper Information: 1000 : Progress : Source connected : 
SPImportHelper Information: 1004 : DataSetSource : Fill select * from [files$] where [ImportStatus] = 'Import'
SPImportHelper Information: 1000 : Progress : Source filled : 2 rows loaded
SPImportHelper Information: 1000 : Progress : About to connect to destination : 
SPImportHelper Information: 1019 : Authenticating: Authenticating to url https://xxxxxxxx.sharepoint.com/sites/xxxxxxx-xxxxxxxxxxx
SPImportHelper Information: 1020 : Authenticating: Authenticating with username xxxxxxxx@xxxxxxxx.com
SPImportHelper Information: 1021 : Authenticating: Authenticating using ClientAuthenticationMode Default
SPImportHelper Information: 1000 : Progress : Exception during import : The remote server returned an error: (403) Forbidden. : System : 
Using "Specified Credentials" and setting Domain, Username and Password to the correct values I get the same 403 error.

Using "Forms Authentication" I get a different error:
SPImportHelper Information: 1000 : Progress : About to connect to source : 
SPImportHelper Information: 1000 : Progress : Source connected : 
SPImportHelper Information: 1004 : DataSetSource : Fill select * from [files$] where [ImportStatus] = 'Import'
SPImportHelper Information: 1000 : Progress : Source filled : 2 rows loaded
SPImportHelper Information: 1000 : Progress : About to connect to destination : 
SPImportHelper Information: 1019 : Authenticating: Authenticating to url https://xxxxxxxx.sharepoint.com/sites/xxxxxxx-xxxxxxxxxx
SPImportHelper Information: 1020 : Authenticating: Authenticating with username xxxxxxxx@xxxxxxxx.com
SPImportHelper Information: 1021 : Authenticating: Authenticating using ClientAuthenticationMode FormsAuthentication
SPImportHelper Information: 1000 : Progress : Exception during import : The user's login name or password is not valid. : Microsoft.SharePoint.Client.Runtime : 
I can see from the log that the URL and username are correct, and I retyped to password several times (and re-saved the XML file) so I am confident that the entered data is correct, but SharePoint is not accepting it.
Aug 2 at 2:36 PM
I have managed to get this to work by using a SharePoint admin account that is not part of our AD system.
If I use admin@xxxxxxxx.onmicrosoft.com and Office 365 authentication everything works OK.

So, is there something I need for DIFS to work with federated sign-in (user@xxxxxxxx.com), or is this a limitation of DIFS/SharePoint that I have to use a xxxxxxxx.onmicrosoft.com address?

I found some mentions on the net of SharePoint Online Client Components SDK https://www.microsoft.com/en-us/download/details.aspx?id=42038 This installs a bunch of DLLs into C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI
Some of these DLLs have the same names as the DLLs installed by DIFS but the files are different. Presumably DIFS uses version 15 files, and they may not support federated authentication?