1

So I came across this post about accessing CRM data from an external application. How do we handle permissions? In my case, an external web site will be pushing & pulling data from CRM 2011 in the cloud. How will permissions be handled? How do I set permissions when making a call? Every piece of documentation I've seen shows examples of jQuery, but running within CRM, rather than externally.

Community
  • 1
  • 1
Tim Gabrhel
  • 446
  • 6
  • 24
  • I've cut small pieces of code from [this](http://msdn.microsoft.com/en-us/library/gg309549.aspx) article, just to create an AccountSet record. I browsed the OrganizationData.svc endpoint, authenticated, then ran my HTML page which executes the jQuery. I get a "success" result on the ajax post result, but data is empty. Is it connecting, but not submitting the data? – Tim Gabrhel May 05 '11 at 15:07
  • Using fiddler, i see the request getting a 302 (redirect) when it hits OrganizationData.svc, and it stops there. When I browse it manually, I end up with a 200, cause it worked fine. I'm guessing the redirect is Microsoft's redirection for authentication. But why does it vary in browser vs jQuery? – Tim Gabrhel May 05 '11 at 17:00

1 Answers1

3

I'm not quite sure, but according to the SDK you cannot use the REST-endpoint outside of the CRM.

The article about Use the REST Endpoint for Web Resources states following limitation

Authentication is only possible within the application Use of the REST endpoint is limited to JScript libraries or SilverlightWeb resources.

This explains why all examples only show the internal usage.

ccellar
  • 10,326
  • 2
  • 38
  • 56
  • Argh...Thanks for that. What alternatives do I have? I need to be and to send and receive data with CRM externally. – Tim Gabrhel May 05 '11 at 20:23
  • @Tim Gabrhel which technology do you use? – ccellar May 09 '11 at 19:40
  • 1
    The external web app that will be consuming this data is a php based application. I have to find some sort of way to get a 'hook' in to CRM to pass the data back and forth. However, I don't think my question is still applicable. It's more of a 'where will this *thing* live' question, and that will determine my answer. – Tim Gabrhel May 09 '11 at 20:07