Request a topic or
contact an Arke consultant
May 2011

Arke Systems Blog

Useful technical and business information straight from Arke.

About the author

Author Name is someone.
E-mail me Send mail

Recent comments




The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2023

CRM 2011 Claims Based Authentication and CrmSvcUtil.exe

The crmsvcutil program has some lousy code in it that breaks when you are using "Claims based authentication" (which is used for Internet Facing Deployments - IFD).

This error shows up as:

" Exiting program with exception: The logon attempt failed

Enable tracing and view the trace files for more information."

The fine folks at adxstudio have provided a dll that you can use to work around the problem.

This is specifically for the 5.0.3 version of the SDK, which is the one currently available today at

Presumably MS will fix this in the next SDK release.

Put the dll into the bin directory that has your crmsvcutil, and then add to your command line:

/metadataproviderservice:"MetadataProvider.IfdMetadataProviderService, MetadataProvider" /codecustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration"

For example, a working command line is:

C:\projects\crm2011\sdk5.0.3\sdk\bin>crmsvcutil /url:https://CRM.YOURCOMPANY.COM/xrmservices/2011/organization.svc /out:xrm.cs /u[username] /p:"[passwordgoeshere]" /metadataproviderservice:"MetadataProvider.IfdMetadataProviderService, MetadataProvider" /codecustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration"

The root cause is the MS crmsvcutil included this code:

if (orgServiceConfig.AuthenticationType != AuthenticationProviderType.LiveId)

which doesn't account for IFD using AuthenticationProviderType.Federation

(bug found in

Posted by Eric Stoll on Monday, May 23, 2011 1:43 AM
Permalink | Comments (0) | Post RSSRSS comment feed