BTDF and “The mapping does not exist” SSO Error

By jpsmit
May 15, 2014
0

Recently I needed to use SSO in an existing BizTalk solution where we use the BizTalk Deployment Framework.

Adding SSO support is so easy, but I ran into the famous “The mapping does not exist” SSO error. It took me some time to figure out what the cause was, and by posting it here I hope someone will benefit from it.

To start with some background. The requirement was a configurable value in a mapping, which would be different for Dev/Test/Prod environments. So typically something for SSO.

To deploy SSO as part of the BTDF is pretty easy. In the btdfproj file you have to specify: <IncludeSSO>true</IncludeSSO>

Next, you have to make sure to define the SSO security groups in the btdfproj and settings Excel file. You can also define custom values in the settings Excel, like ‘SomeValueFromSettings’:  <ItemGroup>    <PropsFromEnvSettingsInclude=SsoAppUserGroup;SsoAppAdminGroup;SomeValueFromSettings; />  </ItemGroup>

Finally you have to add this to the btdfproj:  <TargetName=CustomSSOCondition=‘$(Configuration)’ == ‘Server’>
<UpdateSSOConfigItem BizTalkAppName=$(BizTalkAppName)SSOItemName=“SomeValueToBeUsedSSOItemValue=$(SomeValueFromSettings)/>
</Target>

So far so good, this deploys the SSO settings as expected. The interesting thing is how to get these values out of SSO again. The BTDF uses a special technique to store the settings, which means you should only use the provided SSOSettingsFileReader.dll assembly to get values out of SSO.

I used the BizTalk Mapper Extensions Utility Pack to use the SSO Config Get functoid. This all seems to work fine, but if the map is executed at runtime you’ll receive the error “The mapping does not exist”.

Although more reasons exist for this error, for this case it turned out the way of retrieving the SSO values was not supported. Obviously the extension pack uses a different way to retrieve the values from SSO, which works fine if you deploy values to SSO using for example the SSO Configuration Application MMC Snap-In.

Because I wanted to use the BTDF I changed the functoid to a Scripting Functoid which calls an external assembly method of the SSOSettingsFileReader assembly. After this change it worked right away.

After all a pretty simple solution, but isn’t that always the case 🙂

HTH,

Jean-Paul Smit

Didago IT Consultancy

Comments: 0

Leave a Reply

Your email address will not be published. Required fields are marked *