ShareFileLogoThe Citrix ShareFile Sync application is quite limited in functionality, one of those limitations is that you can only synchronize to a single (one) local folder.

As Helge Klein wrote in his excellent article "Configuring Citrix ShareFile Sync from PowerShell" this is simply a GUI restriction and not a restriction in the actual ShareFile sync engine.

Helge describes that you can easily do this in PowerShell with the following example:

While the command was accepted, nothing was synchronized.

I then created a Sync job with the Gui and noticed it had a different value for Authentication Type:

Notice that the AuthenticationType is not listed as an Integer but with it’s name. The job that I added however had AuthenticationType 4 while I expected oauth_sharefile as per Helge’s article.

Let’s use PowerShell to tell us what the possible values are for AuthenticationType:

Here’s the output:

As you can see there is no value 4! Perhaps Helge used an older version of the Sharefile Windows Client or the Enterprise version. Shame on the developers though for documenting so badly and breaking stuff between versions and editions.

This is also shows two design principles of a REST API (which is what lies under the PowerShell commands) that I dislike:

  • REST does not require the client to know anything about the structure of the API.
  • REST expects the server to provide whatever information the client needs to interact with the service.

This means that there’s little type safety and that input validation is often lacking.

To complete this post let’s do the same trick for SyncDirection which type is

I changed the AuthType param to 0 and now my folder is synchronizing.

Happy synching!