Monday, February 2, 2009


The GenerateAuthenticationHeader function retrieves a properly formed Microsoft Dynamics CRM authentication header. This authentication header automatically determines the appropriate authentication type to use for each deployment type: on-premise, IFD, or Microsoft Dynamics CRM Online. Note that the SOAP header for IFD does not include information about the CrmTicket because a session-based ticketing system is used. For more information, see Authentication.

Each XMLHttp request requires a <soap:Header>
You can generate this header for your code by using the following function:
Without this function you would need to define a SOAP header in your code like the one here for the on-premise version:

<CrmAuthenticationToken xmlns="">
<AuthenticationType xmlns="">
<OrganizationName xmlns="">
<CallerId xmlns="">

1 comment:

naren said...

This GenerateAuthenticationHeader() function only works from Crm 4.0 Version. Dont try it with the previous versions. Thanks