Each XMLHttp request requires a <soap:Header>
Example
You can generate this header for your code by using the following function:
GenerateAuthenticationHeader();
Without this function you would need to define a SOAP header in your code like the one here for the on-premise version:
<soap:Header>
<CrmAuthenticationToken xmlns="http://schemas.microsoft.com/crm/2007/WebServices">
<AuthenticationType xmlns="http://schemas.microsoft.com/crm/2007/CoreTypes">
0
</AuthenticationType>
<OrganizationName xmlns="http://schemas.microsoft.com/crm/2007/CoreTypes">
AdventureWorksCycle
</OrganizationName>
<CallerId xmlns="http://schemas.microsoft.com/crm/2007/CoreTypes">
00000000-0000-0000-0000-000000000000
</CallerId>
</CrmAuthenticationToken>
</soap:Header>
1 comment:
This GenerateAuthenticationHeader() function only works from Crm 4.0 Version. Dont try it with the previous versions. Thanks
Post a Comment