This has probably to do with user rights. On your local Tableau Desktop instance you log in to Sharepoint with your own (Windows) credentials, but Tableau Server logs into Sharepoint on different credentials.
If you publish the datasource you have to embed your own credentials, or the standard Tableau user needs to be granted access to Sharepoint. The exact configuration depends on the way how everything is implemented (Tableau, Sharepoint) within your organisation.
Johan de Groot