We're trying to access a D365 CRM instance via a custom URL, i.e. using crm.sampleurl.com to access samplesite.crm11.dynamics.com. The reason for this is that we have a software proxy to run under the custom URL that will allow us to provide a multilingual interface for D365 (www.linguaskin.com).
We have a working solution, but it requires us to run the whole authentication process through our proxy so that we can control the final redirect to the D365 URL, i.e. to direct it to our custom URL. However, this feels like a fragile approach as any untested route through the authentication process, or any changes in the future could break it.
So, we have a simpler solution - create an app in the Main (list of apps) home page for D365, and when selected automatically run javascript to redirect the user to the custom URL. This works.
However, it causes the user to go through the login process, and via our proxied authentication process, since the login/auth cookies for *.crm11.dynamics.com aren't available under the new domain.
In manual tests we've extracted the value of the CRMOWinAuth cookie (using Fiddler), added it into our Javascript redirect (as part of the querystring, our proxy them does a redirect/set-cookie to get this into the browser for the domain) and this works.
But, we can't directly get the CRMOWinAuth cookie value in our javascript as its set to httponly.
Is there a way to get this value so that it can be accesses by Javascript? For instance, is it possible to have a user interface field on a dashboard that triggers some custom code/module (apologies for wrong terminology!) to render the CRMOWinAuth value on the response returned to the browser (so that Javascript can extract it)?
Or, is there another way that anyone can suggest on how we can get this redirect to another domain name whilst maintaining the authentication context for the user?