We are using a custom WCF Behaviour in BizTalk server 2013 R2 to connect Dynamics CRM online. This custom Behaviour connects to https://login.microsoftonline.com/RST2.srf and send a SOAP requests to get a token back and then appends the token to the actual CRM request to connect CRM Organization service.
When we are using onmicrosoft account,login.microsoftonline is returning a valid token but throwing error "Direct login to WLID is not allowed for this federated namespace " when trying to connect with a SSO account






