We have configured dual write for Project operation.
While creating a new customer we are getting the following error
[Forbidden], [{"Message": "Please verify that the user is valid and set up correctly."}], The remote server returned an error: (403) Forbidden.
This error comes only if we add a customer group Id to the customer.
If we do not add the customer category Id then customers are getting created without any error.
Error details are as follow
Exception Message: [Forbidden], [{"Message":"Please verify that the user is valid and set up correctly."}], The remote server returned an error: (403) Forbidden.
ErrorCode: -2147220891
HexErrorCode: 0x80040265
ErrorDetails:
ApiExceptionSourceKey: Plugin/Microsoft.Dynamics.Integrator.DualWriteRuntime.Plugins.PreCommitPlugin, Microsoft.Dynamics.Integrator.DualWriteRuntime.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
ApiStepKey: a0874d1e-946a-eb11-a812-000d3a19c9ce
ApiDepthKey: 1
ApiActivityIdKey: d6f78549-f9f3-4668-9bfa-ec35dcf085d2
ApiPluginSolutionNameKey: msdyn_DualWriteCore
ApiStepSolutionNameKey: msdyn_DualWriteCore
ApiExceptionCategory: ClientError
ApiExceptionMesageName: IsvAborted
ApiExceptionHttpStatusCode: 400
HelpLink: go.microsoft.com/.../
TraceText:
[Microsoft.Dynamics.Integrator.DualWriteRuntime.Plugins: Microsoft.Dynamics.Integrator.DualWriteRuntime.Plugins.PreCommitPlugin]
[a0874d1e-946a-eb11-a812-000d3a19c9ce: Create of account]
[INF] - [02/09/2021 11:31:03.334 AM] - plugin [PreCommitPlugin] invoked with the message of [InternalPipeline] for target [Microsoft.Xrm.Sdk.OrganizationRequestCollection].
[INF] - [02/09/2021 11:31:03.334 AM] - Tag:
[INF] - [02/09/2021 11:31:03.334 AM] - TransactionStatus: InProgress
[INF] - [02/09/2021 11:31:03.334 AM] - TransactionId: 20502749048
[INF] - [02/09/2021 11:31:03.334 AM] - Create of [account:d5265245-ca6a-eb11-a812-000d3a1ac31b] with depth of 1
[INF] - [02/09/2021 11:31:03.334 AM] - Retrieving runtime configuration records for [1] unique entities
[INF] - [02/09/2021 11:31:03.366 AM] - 1 runtime configuration records are retrieved
[INF] - [02/09/2021 11:31:03.366 AM] - {[account:d5265245-ca6a-eb11-a812-000d3a1ac31b:0],[(0, 1, Create)],[territorycode,address2_freighttermscode,msdyn_partynumber,address2_shippingmethodcode,accountid,followemail,donotbulkemail,msdyn_creditlimitismandatory,donotsendmm,customertypecode,msdyn_vendorcreatedbyworkflow,isprivate,businesstypecode,donotpostalmail,donotbulkpostalmail,name,accountnumber,address2_addresstypecode,donotphone,msdyn_language,msdyn_onholdstatus,transactioncurrencyid,msdyn_onetimecustomer,msdyn_customergroupid,msdyn_invoiceaddress,msdyn_company,donotemail,preferredcontactmethodcode,donotfax,merged,customersizecode,marketingonly,accountratingcode,shippingmethodcode,msdyn_taxexempt,processid,creditonhold,participatesinworkflow,accountclassificationcode,exchangerate,openrevenue_date,opendeals,openrevenue_state,address1_addressid,opendeals_state,openrevenue,modifiedbyyominame,createdbyyominame,owneridyominame,address2_addressid,opendeals_date]}
[INF] - [02/09/2021 11:31:03.381 AM] - Retrieving current OrganizationDetail for CRM environment
[INF] - [02/09/2021 11:31:03.381 AM] - OrganizationId: 49c6b317-9981-4684-a8ff-a91b6019d892, FriendlyName: AVAPU39PROJOPSCDX. EnironmentId: b25341f2-2c6e-4a20-9fd8-9a2c8bb70705, Geo: NA, UniqueName: 49c6b31799814684a8ffa91b6019d892
[INF] - [02/09/2021 11:31:03.381 AM] - AxApiVersion: 17
[INF] - [02/09/2021 11:31:03.381 AM] - Building transaction payload
[INF] - [02/09/2021 11:31:03.381 AM] - Adding account#d5265245-ca6a-eb11-a812-000d3a1ac31b record into unique dictionary for operation type Create
[INF] - [02/09/2021 11:31:03.381 AM] - Adding new secure config to Cache
[INF] - [02/09/2021 11:31:03.412 AM] - source filter: customertypecode eq '3'
[INF] - [02/09/2021 11:31:03.412 AM] - return value from filter: True
[INF] - [02/09/2021 11:31:03.412 AM] - Build Data Payload for Entity - account
[INF] - [02/09/2021 11:31:03.412 AM] - Destination Legal Entity : [:msdyn_company] -> account.USPM:b85bc077-9a65-4f12-b0dd-6af167bb5581 -> USPM:b85bc077-9a65-4f12-b0dd-6af167bb5581
[INF] - [02/09/2021 11:31:03.412 AM] - LookupField = {transactioncurrencyid}, Reference = {/transactioncurrency(c1d77789-bb63-eb11-bb25-000d3a102522)}, Requested Attributes = {isocurrencycode}
[INF] - [02/09/2021 11:31:03.444 AM] - LookupField = {msdyn_customergroupid}, Reference = {/msdyn_customergroup(b7f0548a-9c6a-eb11-a812-000d3a19c9ce)}, Requested Attributes = {msdyn_groupid}
[INF] - [02/09/2021 11:31:03.444 AM] - Skips generating field data requests for [address2_city,address2_country,address2_county,address2_stateorprovince,address2_line1,address2_postalcode,creditlimit,address1_city,address1_country,address1_county,address1_postalcode,numberofemployees,emailaddress1,fax,telephone1,primarytwitterid,websiteurl,description,msdyn_creditrating,msdyn_identificationnumber,msdyn_partycountry,msdyn_partystateprovince,msdyn_paymenttermsbasedays,msdyn_primaryfacebookid,msdyn_faxextension,msdyn_primarylinkedinid,msdyn_taxexemptnumber,msdyn_emailaddress1description,msdyn_primaryfacebookdescription,msdyn_faxdescription,msdyn_primarylinkedindescrption,msdyn_telephone1description,msdyn_telephone1extension,msdyn_primarytwitteriddescription,msdyn_websiteurldescription,address1_line1,address1_stateorprovince]
[INF] - [02/09/2021 11:31:03.444 AM] - {'Customers V3':{'CUSTOMERACCOUNT':'VGVzdCB1c2VyMQ==','ORGANIZATIONNAME':'VGVzdCBVc2VyIDE=','SALESCURRENCYCODE':'VVNE','CREDITLIMITISMANDATORY':'bm8=','CUSTOMERGROUPID':'MTA=','INVOICEACCOUNT':'','INVOICEADDRESS':'aW52b2ljZUFjY291bnQ=','ISONETIMECUSTOMER':'bm8=','ONHOLDSTATUS':'bm8=','PAYMENTDAY':'','PAYMENTMETHOD':'','PAYMENTSCHEDULE':'','PAYMENTTERMS':'','VENDORACCOUNT':'','LANGUAGEID':'ZW4tdXM=','PARTYTYPE':'T3JnYW5pemF0aW9u','PARTYNUMBER':'UEFSLTAxMDEyLUw4SjI=','CONTACTPERSONID':'','SALESTAXGROUP':''}}
[INF] - [02/09/2021 11:31:03.459 AM] - Adding payload of operation [Create] entity pair (account, Customers V3)
[INF] - [02/09/2021 11:31:03.459 AM] - Entity account/Customers V3 is dependent on 0 instances
[INF] - [02/09/2021 11:31:03.459 AM] - Parsing dependencies for entity account of ID 0
[INF] - [02/09/2021 11:31:03.459 AM] - Ignoring dependency on transactioncurrency which is not part of transaction
[INF] - [02/09/2021 11:31:03.459 AM] - Ignoring dependency on msdyn_customergroup which is not part of transaction
[INF] - [02/09/2021 11:31:03.459 AM] - Handling node account of ID 0 with References 2 of type Create/Update
[INF] - [02/09/2021 11:31:03.459 AM] - Adding account to sorted list
[INF] - [02/09/2021 11:31:03.459 AM] - Original entity order: Customers V3
[INF] - [02/09/2021 11:31:03.459 AM] - Sorted entity order: Customers V3
[INF] - [02/09/2021 11:31:03.459 AM] - Payload : {"cdsInboundData":"{\"transactionId\":\"20502749048\",\"cdsInboundEntityDataList\":[{\"entityName\":\"Customers V3\",\"fieldValu ...
[INF] - [02/09/2021 11:31:03.459 AM] - Request Header Info: Key: ms-dyn-caid Value: 932bd7ed-5687-48cd-96ab-3862e3ab5e19
[INF] - [02/09/2021 11:31:03.459 AM] - AddAuthentication: starting AcquireToken
[INF] - [02/09/2021 11:31:03.459 AM] - AddAuthentication: authentication token endpoint is login.microsoftonline.com/5b619e8d-9886-4c7b-bdf6-585dcfb14acb
[INF] - [02/09/2021 11:31:03.459 AM] - AddAuthentication: authentication resource is avapu39projops1d17b31119cf382f0devaos.cloudax.dynamics.com
[INF] - [02/09/2021 11:31:03.459 AM] - AddAuthentication: authentication type is ClientCredential
[INF] - [02/09/2021 11:31:03.459 AM] - The bearer authentication token was successfully obtained.
[INF] - [02/09/2021 11:31:03.459 AM] - Destination : {POST - avapu39projops1d17b31119cf382f0devaos.cloudax.dynamics.com/.../Microsoft.Dynamics.DataEntities.WriteToEntityBatch}
[ERR] - [02/09/2021 11:31:03.772 AM] - [Forbidden], [{"Message":"Please verify that the user is valid and set up correctly."}], The remote server returned an error: (403) Forbidden. - - at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
at System.Net.WebClient.UploadData(Uri address, String method, Byte[] data)
at Microsoft.Dynamics.Integrator.DualWriteCore.Shared.SendTransactionPayload.SendPayloadToFinOps(ICrmServices crmServices, IPayloadProvider provider, Payload payload)
at Microsoft.Dynamics.Integrator.DualWriteCore.Shared.SendTransactionPayload.SendPayload(IPayloadProvider provider, ICrmServices crmServices, String dataPayload)
at Microsoft.Dynamics.Integrator.DualWriteCore.Shared.SendTransactionPayload.TrySendPayload(ICrmServices crmServices, String dataPayload, IList`1 providers, CrmPluginUnsecureConfiguration unsecureConfig, CrmPluginSecureConfiguration secureConfig, Boolean alertUser)
[INF] - [02/09/2021 11:31:03.772 AM] - no matching alert settings for ServiceForbidden.