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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Test Dynamics CRM Web API call using SoapUI

(0) ShareShare
ReportReport
Posted on by 1,077

Hello,

Hope everyone staying safe and healthy. I am testing Dynamics CRM Web API connection using SoapUI.I am on Dynamics 365 on-premise and using NTLM authentication. GET method is working fine. But POST method is giving me below error, Can someone tell me what am I doing wrong? And how to troubleshoot this kind of errors? Any logs to see for details of error?

HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
Server:
jsonerror: true
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
Date: Sun, 21 Jun 2020 03:18:41 GMT
Content-Length: 91

{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}

Web-API-error.jpg

I have the same question (0)
  • Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Leadsourcecode and statuscode field value should not be in quote("1", "1"). It should be in below format.

    {

    "firstname" = "t";

    "lastname" = "p";

    "emailaddress1" = "t@p.com";

    "subject" = "subject";

    "leadsourcecode" = 1;

    "statuscode" = 930720002;

    }

    Make sure you are passing correct optionset value for leadsourcecode and statuscode.

    If found helpful, Please mark my answer verified.

  • Vijayakumar Kenchugundu Profile Picture
    1,077 on at

    Bipin - Thanks for your prompt response. But still no luck. I am using NTLM authentication with a CRM System admin user. BTW, how to enable logs to see detailed errors?

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Can you download Postman tool and try the same thing in that.

    www.postman.com/.../

    Also, you mentioned that GET is working with NTML Authentication, only post is not working. Can you enable tracing on server and check for the logs. Also check event viewer on web server for the error details.

    If found helpful, Please mark my answer verified.

  • Vijayakumar Kenchugundu Profile Picture
    1,077 on at

    I found answer for this. Since I have Dynamics 365 on-premise with IFD and using ADFS 3.0. ADFS won't allow NTLM connections. Our environment is configured Claims based authentication. In order to make this Web API call to work on/from any application/client, first that application/client has to be registered on ADFS to get authorization code and then use that code to get access token to authenticate. It is really hard way of doing it. I managed with some old connector (Partner-Hosted IFD) which worked with SOAP service instead Web API. So, I am good for now to continue in a old fashion of using SOAP services.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans