Another BCS Hybrid Tip - Fixing "The Type name for the Secure Store provider is not valid" Error

Here's another error that are actually pretty likely to see if you are setting up BCS hybrid. When you configure your BCS connection in o365 to connect to your on premises data source, one of the things you need to configure is the security that's going to be used to make the call into your data source. In many cases you will want to use a Secure Store Service application and keep a set of credentials in there. You can configure your connection to do that just fine, but when you try and import your data model in o365 you will get an error message that says "The type name for the secure store provider is not valid". If you look into this error further in your on prem ULS logs you will see something to the effect that it's asking for version 16.0.0.0 of the secure store assembly. That's the version that's running in o365 today, but on premises today you have version 15.0.0.0.

After looking at some different options, we ultimately decided that for now the best way to work around this problem is to add an assembly binding redirect to the web application in the on premises farm. When I say "the web application", what I mean is the web application your BCS connection in o365 points at in the connection. In the connection itself, you will need to have an endpoint for the client.svc, and to do that you use a web application that you have published through your reverse proxy. So if your web application is at https://www.foo.com, then in BCS you would configure the endpoint as https://www.foo.com/_vti_bin/client.svc

So...in the web.config for that web application you would add an assembly redirect that looks like this:

<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
 <assemblyIdentity name="Microsoft.Office.SecureStoreService" publicKeyToken="71e9bce111e9429c" culture="neutral" />
 <bindingRedirect oldVersion="16.0.0.0" newVersion="15.0.0.0" />
</dependentAssembly>

I'll have more details on this and all the rest at the post-SPC training that Bill Baer and I are doing.