Connecting MSCRM On-Premise/IFD with Java
One of the Big challenges while integrating Microsoft Dynamics CRM with non.Net / Microsoft technology is around authentication. While there are some articles explaining ways to do it, it can become quite challenging to implement.
MSCRM Dynamics has three versions
- Online: Authentication is through Live
- On-Premise: Authentication is through Active – Directory
- Hosted (3rd Party): Authentication is through IFD / Claims based.
Connecting with Live is much simpler and there are samples available by Microsoft on how best to connect with non-microosft technologies. When it comes to Active-Directory and IFD, there are little information/guidelines available.
After some research, we felt it would best to build an Http/WebServer to.Net Proxy to tunnel a Java. Javascript or Php based authentication mechanism like Basic or OAuth and tunnel the calls to MSCRM On-Premise or hosted environment.
Here are some high-level steps
- Create a.Net Proxy Server to route calls to MSCRM Dynamics On-premise or Hosted
- Override the Authentication so that a Basic Auth or OAuth gets translated to Active-Directory or IFD
- Route corresponding Calls to the underlying MSCRM SOAP calls (OrganizationService or DiscoveryService)
- Maintain a session on Proxy Server so that calls get routed properly to the right SOAP Service on MSCRM.
[Java, JavaScript or Php] -> Http Auth -> MSCRM Web Proxy -> Auth a session with MSCRM -> return auth
[Java, JavaScript or Php] -> Calls to SOAP -> MSCRM Web Proxy -> route calls to MSCRM SOAP -> return response
[Java, JavaScript or Php] -> Ends Session -> MSCRM Web Proxy -> Ends Session or expires in-active sessions -> return response
Ā This approach worked well. You can find a WebProxy to MSCRM Dynamics On-premise / Hosted through our DBSync ETL tool, which provides features for reading, writing and exploring meta-data on MSCRM On-premise / Hosted. It does support all three versions of authentications.