Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

An unsecured or incorrectly secured fault was received from the other party

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Developers,

I am trying to integrate the web application with the Dynamics 356 Online CRM.

It is making the connection to the organisation but while creating the contact it comes up with the following error "An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code". Attached is the error screenshot

fault-exception.JPG

IServiceConfiguration<IOrganizationService> orgConfig = ServiceConfigurationFactory.CreateConfiguration<IOrganizationService>(new Uri("companyname.api.crm4.dynamics.com/.../Organization.svc"));
            ClientCredentials creds = new ClientCredentials();
            
            creds.UserName.UserName = "username";
            creds.UserName.Password = "somepassword";
            creds.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
            var orgService = new OrganizationServiceProxy(orgConfig, creds);
            orgService.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());

       
Can someone please help me to rectify this issue.

Many Thanks

Jibran


*This post is locked for comments

  • Suggested answer
    Nishant Rana Profile Picture
    Nishant Rana 11,320 Microsoft Employee on at
    RE: An unsecured or incorrectly secured fault was received from the other party

    This might help

    nishantrana.me/.../

    nishantrana.me/.../

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: An unsecured or incorrectly secured fault was received from the other party

    Hi Mark,

    Thanks for your response I have been trying number of solutions to connect to the CRM Online server, but unable to do so. Lastly I tried using the SDK Authentication program to run and it came up with the following error which is below. It does ask me for the server name so I put my url in that 

    Enter a CRM server name and port [crm.dynamics.com]: somename.crm4.dynamics.co
    m
    Is this organization provisioned in Microsoft Office 365 (y/n) [y]: y
    The application terminated with an error.
    Metadata contains a reference that cannot be resolved: 'https://disco.multifleet
    .crm4.dynamics.com/XRMServices/2011/Discovery.svc?wsdl&sdkversion=7.1'.
    The remote name could not be resolved: 'disco.multifleet.crm4.dynamics.com'

    Can you please help me to make a connection I shall be very thankful to you?

     

     

  • tw0sh3ds Profile Picture
    tw0sh3ds 5,600 on at
    RE: An unsecured or incorrectly secured fault was received from the other party

    Connecting to CRM Online is not that simple I'm afraid.

    You shoud use XrmTooling for that and simplified connection, it would be much easier:

    msdn.microsoft.com/.../jj602970.aspx

    If you cannot use external libraries (not sure why) you can use my code, which I posted in an answer here:

    stackoverflow.com/.../7708157

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans