locked
Call Sharepoint 2013 Online web services in CRM 2013 Online plugin RRS feed

  • Question

  • Requirement is to extract attachement from CRM Email activity in CRM 2013 ONLINE and save it sharepoint 2013 Online. Need to know how to call sharepoint 2013 Online web service in sandboxed plugin.

    I tried Wictor Wilen's code. It works fine in c# console apllication but doesn't work for CRM plugin(On-premise/Online); gives error

    EndPointNotFoundException:

    {"There was no endpoint listening at https://login.microsoftonline.com/extSTS.srf that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."}

    InnerException:

    {"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 157.56.58.13:443"}

    Need some pointer to authenticate & call Share Point 2013 online web service in sandboxed plugin for CRM 2013 online.

    Thank you.

    JayshriP

     

    Friday, December 13, 2013 9:16 AM

All replies

  • Check our Rhett's blog post - http://bingsoft.wordpress.com/2013/06/19/crm-online-to-sharepoint-online-integration-using-rest-and-adfs/

    It uses Wictor's code as a base - I was able to use this approach to connect to SharePoint Online using a plugin with a little work


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Friday, December 13, 2013 2:06 PM
    Moderator
  • Thanks Jason. I will check it.

    With my pervious code, now I am able to connect to Sharepoint online and upload a document there in  plugin On-premise delpoyment but still it doesn't work for On-line plugin. It gives following error:

    That assembly does not allow partially trusted callers.   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
       at System.Net.WebClient.DownloadData(Uri address)

    Any pointers? Is it because of "Microsoft.IdentityModel" or "System.Runtime"? I will check the Rhett's blog as well.

    JayshriP


    • Edited by JayshriP Monday, December 16, 2013 10:13 AM
    Monday, December 16, 2013 10:06 AM
  • it was awhile ago I implemented this so my memory is a bit fuzzy - but I believe I ran into an issue with this line of code:

    System.Web.Script.Serialization.JavaScriptSerializer json = new System.Web.Script.Serialization.JavaScriptSerializer();

    As I recall I don't think you are able to use that in sandboxed mode - so I ended up finding some other code to de-serialize the response JSON. 


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Monday, December 16, 2013 2:11 PM
    Moderator
  • Yes Jason. I am trying Rhett's code and as you mentioned I am also trying some other code to de-serialize the JSON response. Because above mentioned line of code uses System.Web.Extensions assembly which is not supported for partially trusted sandboxed code.

    Thank you.

    JayshriP

    Tuesday, December 17, 2013 4:26 AM
  • Hi Jason,

    Yes with some changes to Rhett's code, I am now able to connect to SharePoint Online through CRM 2013 Online plugin.

    But I am just able to excute HTTP "GET" methods. When I tried HTTP "POST" or "DELETE", it gives "<403> Forbidden" error.

    What can be the reason for error?

    Thank you.

    JayshriP

    Tuesday, December 17, 2013 10:21 AM
  • Hi JayshriP,

    I am also getting a 403 forbidden error when trying to use "POST".  Did you find a solution.

    Thanks,

    Ross

    Tuesday, January 28, 2014 10:46 PM
  • Hi JayshriP, I'm using CRM 2013 ONLINE and sharepoint online and i'm trying to create 6 subfolders automatically for each record, after the record folder is created..

    Can you help me?
    Monday, May 12, 2014 9:30 AM
  • Hi Ross, I'm using CRM 2013 ONLINE and sharepoint online and i'm trying to create 6 subfolders automatically for each record, after the record folder is created..

    Can you help me?
    Monday, May 12, 2014 9:30 AM
  • Hi JayshriP/Ross,

    Did you manage to find the solution for HTTP 403 forbidden error issue when trying to use "POST" operation for creation of folders.

    Can you please help me?

    Thanks,

    Chirag

    Saturday, December 24, 2016 1:18 PM