We were configuring Document integration for CRM on premises 2015 (partner hosted) to SharePoint. After adding the Sharepoint site, setup failed for all entities.
The problem was related to the service account used by the Dynamics SharePoint integration. The same service account that is used for server-side sync for Exchange is used for SharePoint integration. We needed to add that account as a site collection administrator and global administrator. Once we did that all was working as expected.