web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer Service forum

KingswaySoft D365 Web API OAuth - (401) Unauthorized

(0) ShareShare
ReportReport
Posted on by
I'm using KingswaySoft (v10.2) and SSIS to migrate data to D365 (v9.1) for Customer Service (cloud version)
I'm getting the following error from Kingswaysoft in my SSIS package after roughly 1 hour of successful execution - this includes successful record insertion into D365 during this initial 1 hour. This happens every time and I'm not sure how to fix. If I restart my SSIS package then it will happily continue executing for another hour and the error will occur again.
[Dynamics CRM Destination 1 [1955]] Error: An error occurred with the following error message: "KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmServiceException: CRM service call returned an error: CRM service call returned an error: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Bearer authorization_uri=login.microsoftonline.com/.../authorize, resource_id=xxxxxxxx.crm6.dynamics.com'. (SSIS Integration Toolkit for Microsoft Dynamics 365, v10.2.0.6982 - DtsDebugHost, v13.0.1601.5)KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmServiceException
: CRM service call returned an error: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Bearer authorization_uri=login.microsoftonline.com/.../authorize, resource_id=xxxxxxxx.crm6.dynamics.com'.System.ServiceModel.Security.MessageSecurityException
: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Bearer authorization_uri=login.microsoftonline.com/.../authorize, resource_id=xxxxxxxx.crm6.dynamics.com'.System.Net.WebException
(Status Reason: Unauthorized): The remote server returned an error: (401) Unauthorized.".
 
I suspect that the issue is with the OAuth token expiry in Azure AD. If so, I thought KingswaySoft would automatically renew the token?
I'm using the following connection properties on my KingswaySoft connection.
4137.kingswaysoftsettings.png

Thanks for considering my question and any support you can provide!
I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    As an interim workaround I have reverted to the old web service method until this gets resolved.

    7674.image.png

  • Daniel Cai Profile Picture
    935 on at

    Hi, we have identified the source of the issue (it was a tricky one). If you are experiencing the issue, please reach out to our support team, and we will provide you a temporary build which should help resolve the issue. 

  • Eric benco Profile Picture
    320 on at

    @daniel has this problem been resolved yet?  If so where would I download the latest version ?

  • Daniel Cai Profile Picture
    935 on at

    Hi Eric, please reach out to us through email so that we can assist you from there. We don't generally publish the links to our temporary build on public forum (even if it may apply to you).

  • Sara I Profile Picture
    5 on at

    Having a similar issue with CRM 2016 on-premise. SOAP connection works perfectly fine, but Web API connection returns an error when populating the Organization drop box. Know where we can get some assistance?

  • Eric benco Profile Picture
    320 on at

    @daniel  I see 11.1 has been released to the public, but I don't see this fix in the release notes.  should I continue to use the Beta ?

  • Daniel Cai Profile Picture
    935 on at

    This is fixed in our v11.1 release. Let me check with the team why it has been missed in the release notes. 

  • Daniel Cai Profile Picture
    935 on at

    Hi Eric, please go ahead upgrade to the new version, the fix should be in the release. We have just updated our release notes to have it reflected there. Thanks for bringing this to my attention.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Customer Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans