First an explanation of the setup.
- Excel Services Application setup in Central Admin, with the site added as a Trusted File Location and the shared documents library in the site setup as Trusted Data Connection Library (so we could try using a connection file as well as embedded connections).
- Secure Store Service setup, with a Target Applciation ID setup as a group application, the credentials set to the SQLServer login and password with access to the source data and permission set to allow "Domain Users" to access to use the ID.
- A Excel workbook created that fills a PivotTable with data from the source SQLServer database. The embedded connection uses the same account and password setup in the SSS application. The Excel Services Authentication Settings set to use SSS ID defined earlier. Workbook is saved to the library defined as trusted in Excel Services.
- A page created on the site with a webpart to display the pivot table from the workbook.
The page opens cleanly and displays the Excel file's PivotTable (which shows that #1 above is good). But, when I select "Refresh All Connections" from the Data menu, I get the error dialog:
"Access was denied by the external data source. The following connections failed to refresh:..."
With the name of the connection from the Excel file. When I look at the logs on the server, I see two entries:
- Unable to establish a connection using credentials retrieved from SSS. This could be because the Unattended Service Account is not configured or because the credentials retrieved from SSS are not valid.
- Refresh failed for (name of connection) in the workbook '(full URL path to workbook)'.
You would think that the credentials set in SSS were bad. But:
- I went and created an external data type using the same ID and an external list on the same site using that external data type, accessing the same data that should be refreshing in the Excel sheet, and the list displays the data.
- The same account and password is used in the embedded connection in the Excel file, and it returns the data.
- I looked at the logs on the SQL Server machine and see no entry saying that the login failed.
- I turned on a trace in SS Profiler and see attempt to connect when the SharePoint page webpart is attempting a refresh.
- I tried it all using a connection file instead of an embedded connaction, and same issue.
So, it seems that Excel Services is giving the error without even attempting to use the SSS credentials.
I have read every blog entry, MS instruction page and forum I can find, and on clues. I followed this flow chart:
http://technet.microsoft.com/en-us/library/hh369968.aspx
And it would lead you to think that the problem is that the SSS application provides credentials that don't have access to the data, but that has been disproven.
Lastly, I have tried this on two separate servers (farms), and the same happens on both.
So, any clues? I must be missing something either very simple or something in Excel Services is not acting as it should and the error messages themselves are erroneous.
Thank you in advance!