Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

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

$
0
0

Hi. I'm currently learning Extending Microsoft Dynamics CRM Online and On Premise Course Module 5 Using the Organization Service.

I'm simply following the steps according to the lab documentation. The code should be perfectly working but it doesn't work for me.

Connection Strings:

<connectionStrings><add name="CRMOnline"
     connectionString="Url=xxxxx.crm5.dynamics.com;
                 Username=xxxxx@xxxxx.onmicrosoft.com;
                 Password=xxxxx;"/></connectionStrings>


The connection :

CrmConnection con = new CrmConnection("CRMOnline");

        IOrganizationService service = new OrganizationService(con);

        WhoAmIRequest req = new WhoAmIRequest();

        var result = service.Execute(req) as WhoAmIResponse;

        if (result != null)
        {
            Console.WriteLine(String.Format("Organization ID: {0}\nBusiness Unit ID: {1}\nuser ID:{2}", result.OrganizationId, result.BusinessUnitId, result.UserId));
            Console.ReadLine();
        } 

The exception is caught in this line : var result = service.Execute(req) as WhoAmIResponse; Innerexception said "Invalid Request".

  • I have made sure the credentials on connectionStrings are correct multiple times
  • I think I have already synchronized the date & time for my pc and the CRM (synchronized internet time & selected the correct time zone on both PC & CRM. Even tested created a record & checked date&time created is correct.)

What else could cause this error?

Thank You.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>