After enabling IFD on a clients CRM server today and I came accross the Error
Stack Trace Info: [UriFormatException: Invalid URI: The format of the URI could not be determined.]
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at Microsoft.Crm.WebServices.OrganizationEndpointProviderFactory.AbstractOrganizationEndpointProvider.GetWebApplicationUrl(Guid organizationId)
at Microsoft.Crm.Authentication.IfdRedirectAuthenticationProvider.Authenticate(HttpApplication application)
at Microsoft.Crm.Authentication.AuthenticationStep.Authenticate(HttpApplication application)
at Microsoft.Crm.Authentication.AuthenticationPipeline.Authenticate(HttpApplication application)
at Microsoft.Crm.Authentication.AuthenticationEngine.Execute(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
With a bit of investigation and compairing with another system, it was apparent that the IFDTOOL wasnt actually making any changes to the MSCM_Config database in regards to the IFD settings.
This can be solved by the following.
When inside the MSCRM_Config Database
select Id from DeploymentProperties where ColumnName='ADRootDomainScheme'
This will supply you with the GUID for the AD Root Scheme
Once you have this ID, you will need to run the following using the retrieved Guid from above and the correct domain
(Also make sure to change the ifdRootDomainScheme to https if using SSL)
INSERT INTO DeploymentProperties
(Id, ColumnName, NVarCharColumn, Encrypted)
VALUES ('7f424a61-676c-dd11-823c-00155d021522', 'IfdWebApplicationRootDomain', 'DOMAIN.COM:5555', 'false')
INSERT INTO DeploymentProperties
(Id, ColumnName, NVarCharColumn, Encrypted)
VALUES ('7f424a61-676c-dd11-823c-00155d021522', 'IfdSdkRootDomain', 'DOMAIN.COM:5555', 'false')
INSERT INTO DeploymentProperties
(Id, ColumnName, NVarCharColumn, Encrypted)
VALUES ('7f424a61-676c-dd11-823c-00155d021522', 'IfdRootDomainScheme', 'http', 'false')
Run a IISRESET and try again