locked
How Retrieve CRM Ticket? RRS feed

  • Question

  • Hello... I wanna know how can I retrieve the CRM Ticket by web service?

    I already get the Passport and ApplicationID.

     

    Pleaaaaase... Someone Help me!

    Thursday, September 30, 2010 6:30 PM

Answers

  • What configuration do you mean?  IFD shouldn't be necessary, and the configuration of that particular feature should be determined by business and security needs.  If, however, CRM does not have any deployed Organizations, then one must be provisioned before access through the CrmDiscovery service will be possible.  If IFD is not configured, then I would encourage you to follow the example set by the first link I provided as exactly as you can.

    As for your error, I don't believe it's necessarily related to the process of connecting to CRM, in general, and possibly indicates an issue with assemblies referenced by your code.  I don't know if I could help you with that.


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Monday, October 4, 2010 6:04 PM
    Moderator

All replies

  • This is my CRM TICKET Request:

    <?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><soap:Body><Execute xmlns='http://schemas.microsoft.com/crm/2007/CrmDiscoveryService'><Request xsi:type='RetrieveCrmTicketRequest'><OrganizationName>MyOrgName</OrganizationName>

    <PassportTicket>MyPassortTicket</PassportTicket><UserID>MyUserID</UserID><Password>MyPassword</Password></Request>

    </Execute></soap:Body></soap:Envelope>

    Thursday, September 30, 2010 7:40 PM
  • Pleaaaaaase..
    Friday, October 1, 2010 2:23 PM
  • See the SDK article for the same .  Also, this blog may have some good pointers .
    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Friday, October 1, 2010 5:36 PM
    Moderator
  • I already read this article and the blog.

    But I don't have any progress with CRM XML Webservice.

     

    I'm sendind this code to retrieve Passport:

    - <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wssc="http://schemas.xmlsoap.org/ws/2005/02/sc" xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust">
    - <s:Header>
    - <wlid:ClientInfo xmlns:wlid="http://schemas.microsoft.com/wlid">
      <wlid:ApplicationID>MyApplicationID(got from microsoft application page)</wlid:ApplicationID>
      </wlid:ClientInfo>
      <wsa:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</wsa:Action>
      <wsa:To s:mustUnderstand="1">https://dev.login.live.com/wstlogin.srf</wsa:To>
    - <wsse:Security>
    - <wsse:UsernameToken wsu:Id="user">
      <wsse:Username>myemail@hotmail.com</wsse:Username>
      <wsse:Password>myPassword</wsse:Password>
      </wsse:UsernameToken>
      </wsse:Security>
      </s:Header>
    - <s:Body>
    - <wst:RequestSecurityToken Id="RST0">
      <wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType>
    - <wsp:AppliesTo>
    - <wsa:EndpointReference>
      <wsa:Address>crm.dynamics.com</wsa:Address>
      </wsa:EndpointReference>
      </wsp:AppliesTo>
      <wsp:PolicyReference URI="MBI_SSL" />
      </wst:RequestSecurityToken>
      </s:Body>
      </s:Envelope>
     
     And it returns:
      <?xml version="1.0" encoding="utf-8" ?>
    - <S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa="http://www.w3.org/2005/08/addressing">
    - <S:Header>
      <wsa:Action xmlns:S="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Action" S:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue</wsa:Action>
      <wsa:To xmlns:S="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="To" S:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
    - <wsse:Security S:mustUnderstand="1">
    - <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="TS">
      <wsu:Created>2010-10-01T19:34:38Z</wsu:Created>
      <wsu:Expires>2010-10-01T19:39:38Z</wsu:Expires>
      </wsu:Timestamp>
      </wsse:Security>
      </S:Header>
    - <S:Body>
    - <wst:RequestSecurityTokenResponse xmlns:S="http://www.w3.org/2003/05/soap-envelope" xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:psf="http://schemas.microsoft.com/Passport/SoapServices/SOAPFault">
      <wst:TokenType>urn:passport:compact</wst:TokenType>
    - <wsp:AppliesTo xmlns:wsa="http://www.w3.org/2005/08/addressing">
    - <wsa:EndpointReference>
      <wsa:Address>crm.dynamics.com</wsa:Address>
      </wsa:EndpointReference>
      </wsp:AppliesTo>
    - <wst:Lifetime>
      <wsu:Created>2010-10-01T19:34:38Z</wsu:Created>
      <wsu:Expires>2010-10-02T19:34:38Z</wsu:Expires>
      </wst:Lifetime>
    - <wst:RequestedSecurityToken>
      <wsse:BinarySecurityToken Id="Compact0">t=EwB4AnjZAwAUarFr9IJuzzEtFWbw5eVho2wy2bIAAfJ2ZqbDmXUhDQUAPx5H7QNryv8z0IO+bKJKezcwTSFHtcFsRdu3Lb1HhBATgeSWbZp0xockOUf5i02oQF8THocGhdaW1WWq94zasPL00VryU3AujtkACqw0zKCkNKqqwBuTtVwe/eWLyE3zof3iduhxzyn/PqIGEtfxWwScSlJW6AsuBTewggvZnpgDDpTTZqDNcUQcSMwzpk5Z/VgAxN/Bu2NdyZI4Rf1If0nKgxeKrovrwdNZa0Igmgj4lBm3ibgKbI6QaJa167MQORJzlhtHTFVOMztjh9CuF01vunK8HlDbIM+jj+pOxpk/fVq/S5Ny60gxSoj2C5nLgpWCwRQDZgAACOOT1RXjsoSaSAGvCiR7sACxUtcSP8wd5MVucFvIEnQ1aHXUwJsaBtSNx6P9xCtAmowJUU/0c9Z/qpL9nl9cBNMMfhIy2VTeZO4LdktGQspy5if6FsWDtLBtJyxGD/zl0U9WKLPcpqNGcQPCrHukpQR05l85NX2V4So4VqAqmpnwwsGjqhhoKRccjEKrG+5OL/Vaqkq7aCzBigRxmpdQm1qWLzVEGyDAUHkbJCxKPvl0qo9cR7MoBdxqqH5P+2F072jbKoAzqtKthd+RTSPn2gBI9ob1vBUwfrtMF2phNstwMiIEooS3K8CgNI6ZewlpxYnz97oH7br2Qn3pdeD+hubesv/53teFoxmnq7QJPqxepuIKwvhy65cNHq063BxwK/gmyEp3rf+HokLRuCykZVMwJQjIBhgUlDmxkb38mcZ2F2s9edhP7xRmOqfr2PviIcuJfwE=&p=</wsse:BinarySecurityToken>
      </wst:RequestedSecurityToken>
    - <wst:RequestedAttachedReference>
    - <wsse:SecurityTokenReference>
      <wsse:Reference URI="k6DDSfe1WZFsmRfXxQUtnpbpZVk=" />
      </wsse:SecurityTokenReference>
      </wst:RequestedAttachedReference>
    - <wst:RequestedUnattachedReference>
    - <wsse:SecurityTokenReference>
      <wsse:Reference URI="k6DDSfe1WZFsmRfXxQUtnpbpZVk=" />
      </wsse:SecurityTokenReference>
      </wst:RequestedUnattachedReference>
      </wst:RequestSecurityTokenResponse>
      </S:Body>
      </S:Envelope>
    Then I take the 'wsse:BinarySecurityToken' as MyPassport.
    I think that the xml is returning a wrong Passport, because when I sent the code to retrieve a CRMTicket, the page returns an error, something about parsing EntityName.
    Pleaaaaaaase. Someone Help!
    Friday, October 1, 2010 7:42 PM
  • You're passing the text string from the node's text content into the PassportTicket member of the RetrieveCrmTicketRequest instance?  What about the value of the OrganizationName member? (Don't post that here, just asking if it's being set.)

    The bit about an error with EntityName doesn't seme to jive with me.  Then again, I've never worked with CRM Online, so unfortunately I can't take you any further.  Try posting the exact details of the error you receive.


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Friday, October 1, 2010 9:44 PM
    Moderator
  • Ok...

    Now I'm with other question.

     

    The server that contains the CRM not stay at Microsoft server, it's in another domain.

    The question is: To get the ApplicationID, PassportID and CRMTicket is necessary send the XML to 'https://dev.crm.dynamics.com/MSCrmServices/2007/Passport/CrmDiscoveryService.asmx' or to 'http://<<servidor>>:<<port>>/MSCrmServices/2007/Passport/CrmDiscoveryService.asmx'  ???

     

    Please... I really need help!

    Monday, October 4, 2010 3:34 PM
  • Wait wait wait wait....  You're not trying to connect to Microsoft Dynamics CRM Online, but instead trying to connect to an installation of CRM 4.0 On-Premise, which is at some other remote location?  To me, that's what, "The server that contains the CRM not stay at Microsoft server, it's in another domain" means.  It's important to know the difference, because the mechanisms to authenticate differ greatly depending on the scenario.

    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Monday, October 4, 2010 3:43 PM
    Moderator
  • Yes... I'm trying to connect to an installation of CRM at a remote location.

    What's the mechanisms to authenticate this?!

     

    I have right now an User an Password and a url of webservices. ('http://<server>:<port>/mscrmservices/2007/CrmServiceWsdl.aspx')

     

    Pleaaaaaase! =)

    Monday, October 4, 2010 4:39 PM
  • Ok, then you will not use Live authentication to generate a CrmTicket.  Use these as your guide:  http://msdn.microsoft.com/en-us/library/cc151012.aspx and (if IFD is enabled) http://msdn.microsoft.com/en-us/library/cc151010.aspx
    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Monday, October 4, 2010 5:30 PM
    Moderator
  • Ok...

    I read all of them.

     

    But when a sent the XML appear this error:

     msxml3.dll error '80070005'

    Acess denied.

    folder/teste.asp, line 50

     

    And the line 50 contains the code that send the xml.

     

    To solve this problem is necessary configure the server?

    Monday, October 4, 2010 5:42 PM
  • What configuration do you mean?  IFD shouldn't be necessary, and the configuration of that particular feature should be determined by business and security needs.  If, however, CRM does not have any deployed Organizations, then one must be provisioned before access through the CrmDiscovery service will be possible.  If IFD is not configured, then I would encourage you to follow the example set by the first link I provided as exactly as you can.

    As for your error, I don't believe it's necessarily related to the process of connecting to CRM, in general, and possibly indicates an issue with assemblies referenced by your code.  I don't know if I could help you with that.


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Monday, October 4, 2010 6:04 PM
    Moderator