SqlBulkCopy cannot access table
My issue was a bit different, turns out my table name was a reserved keyword in SQL so I had to do the following:
bulkCopy.DestinationTableName = $"{schema}.[{tableName}]";
Where schema
is the target schema and tableName
the target table name
From the documentation
DestinationTableName is a three-part name [database].[owningschema].[name]. You can qualify the table name with its database and owning schema if you choose. However, if the table name uses an underscore ("_") or any other special characters, you must escape the name using surrounding brackets as in ([database].[owningschema].[name_01])
Check that user that connects to db has
GRANT ALTER ON [dbo].[TABLE_XXX] TO [appuser]
as suggested in answer by Jhilden on MSDN forum.