CRM 2011 and SharePoint 2010 / 2013 Integration - Part 1


Hi SharePoint Folks,

I am back with yet another post, this time I will focus on an evergreen subject, Integration between SharePoint and CRM 2011 ? This is a huge topic as there are many possibilities. To have a better clarity on each of the Integration point, I’m going to split the post basis on the integration point covered.

Part 1: Introduction and CRM 2011 - Document management Integration with SharePoint 2010 (This post)

Part 2: Reporting CRM data in SharePoint using Excel services

Part 3: Publishing CRM entities in SharePoint.

Part 4: Search CRM entities from SharePoint Enterprise Search.

SharePoint 2013 folks read this – The below procedures work with SharePoint 2013 too. there is absolutely no change in the below process to make SharePoint 2013 work with CRM 2011 ( any rollup) – UPDATED on Wed 04/10/2013

======If you have CRM in IFD, read below=============

UPDATED section - Tue 02/19/2013

So If you have your CRM setup as internet facing Deployment, you can still use this blog with few things in mind such as :-

1. SharePoint site that you intent to use MUST be accessible via Internet – Reason is that your CRM is internet facing, people will work on CRM from internet, when people work on CRM and go to document management  the SharePoint site loads in that frame. That connection is pure the client to server (End user computer to server), not server to server ( CRM server to SharePoint server). So SharePoint MUST MUST MUST be published via internet.

2. SharePoint MUST be SSL so your SharePoint site must be https.

3. You can use the same ADFS infrastructure to setup SharePoint Web application, use Sarath’s blog to setup the SharePoint and ADFS setup, You can have claims like UPN and ROLE if your Active directory ( or Identity provider) does not necessarily have Email attribute filled. ( if this point is confusing email me here

- Special Thanks to Tarquin  for excellent suggestion to put this info in this SPECIAL section on this 😉 As many of you are searching for this info.

======End of Section===================================

The word you are thinking is “awesome”, well I know J. Ok let’s cut short the talking and make it work, get ready!

CRM 2011 - Document management with SharePoint 2010

So below is what you will need

1. CRM 2011 deployment and some sample data (I populated my CRM with built in sample data).

2. A SharePoint 2010 farm, with a web app created

3. This post

In CRM 2011, document management feature comes OOB. This makes it very easy to setup document management as compared to CRM4. Once we are able to setup this up, a CRM 2011 user can create, upload, download, modify etc. to the documents/content in SharePoint without leaving the CRM UI, AND without using “not so good looking“ IFRAME method. Moreover it’s easy to pull administrative information too, All with minimal efforts J

So here is my CRM


And here is my SharePoint


To actually integrate the two we have to complete 2 tasks

a. Make SharePoint aware that CRM is going to speak to it –

This is done by an add-on, which is essentially a sandbox solution, Please be aware, Sandbox solution has a restriction to work within the site collection, so if your need is to use multiple SharePoint site collection for integrating with CRM, you have to install the sandbox solution on each of the them. Also Note – I am not talking about subsite, I am talking about site collection.

b. Configure CRM to use SharePoint as the backend document server-

This is done simply by configuring the SharePoint site collection URL in the CRM document management’s settings page.

a. On SharePoint – “Make SharePoint aware that CRM is going to speak to it

Step 1 – Log in to any (if you have multiple servers in SharePoint farm, just take any APPLICATION server) SharePoint server with the farm service account –

Download the List component here

Step 2 – Extract the files,

Double click the installer


Read and understand and if you accept the terms tick mark and continue


Select the Location for extraction


Once successfully extracted open the location (“c:\CRM List Component\” in my case)

You will see 3 files, just 2 of them are important.

1 – AllowHtcExtn.ps1 – this is the PowerShell script, which “Allows” SharePoint to allow users to use .htc files. In simple words, SharePoint does not by default allows all the file types to be Opened from within SharePoint. Consider this - if you an html file with JavaScript, this file is in SharePoint, and you open it, the browser will render the JavaScript in the html file, which means if the JavaScript is a malicious one, there is a possibility of damage. So to protect clients SharePoint does not lets you open, but gives you option to save it on your disk. With this PowerShell script we will add the .htc file to the list of allowed once. To view all the “Allowed” files run the:

$WebApp = Get-SPWebApplication –identity <url of your webapp>


2 – crmlistcomponent.wsp - this is the solution, that we will upload to the SharePoint site solution gallery that will enable SharePoint to “Speak” with CRM

Easy till here? The next part is easy too !


Now Open SharePoint central administration site. Navigate to System Settings > Manage Services on Server > Look for “Microsoft SharePoint foundation Sandboxed Code Service”, now Click on Start. On a “Not so important” note - it’s always a good idea/best practice to turn on the services on multiple servers.


UPDATE- The figure above is updated with correct service highlighted.

Ensure that you have started it , otherwise the sandbox solution WILL not work. Ok once this is done open services.msc and ensure the service “SharePoint 2010 User Code Host” is “started”. Not doing these steps are the most common reasons why many get error when they try to Activate the solution.


Now Open the SharePoint site and navigate to the site collection where you want CRM to push the data. In my case I have a default site collection “/” so I will navigate to it in the browser.


Navigate to Site Action> Site Settings > Solutions (Under Galleries)



Upload > and point to crmlistcomponent.wsp


Now click Activate.


On successful activation click on the solution once and ensure that your window looks similar to the one below. I get Deactivate options confirms the solution is successfully activated J


Now Time to run the script

Fire up the SharePoint management shell > navigate to the AllowHtcExtn.ps1 location and run it in the below way

> AllowHtcExtn.ps1 <site collection url>

Eg > AllowHtcExtn.ps1 http://app1/

Successful run will show you a similar window


b. On CRM Server –“Configure CRM to use SharePoint as the backend document server

Step 1- Open CRM 2011 Site > Settings (at bottom of the image)


Click on Document management > click Document Management Settings


Now in the following window tick mark those entities where you WANT to have Document management Option. Eg :- if you only want “Account” entity to have the option to upload and download document select it, if you want document management on other entities like Order, Price List , Contract etc. just select it. By default Account, Article, Lead, Opportunity, Product, Quote and Sales Literature are already selected.

Next Enter the site collection url in the URL box.


CRM now will validate if the sandbox solution is present in that site collection and once it detects its presence will it continue further


Now we are given an option to select – On which Entity should CRM create the folder structure? Based on accounts or Contacts ?


Once we click next it will prompt to create the document libraries in SharePoint, say Ok , and it finishes with a charm.


Since we went with default entities, we got 7 libraries created in SharePoint


And with that last click we are Done !!! Time for testing.

See it in Action

Open the CRM workspace> Open a Account.

Click on Documents menu on the left and you will receive a prompt (it says that I’m going to create a folder with the account’s name) say Ok


We got the library created


Add a document to this


You will see it below like this


If I now do the same operation for the entity Opportunity I will see the documents in a folder name Opportunity under the account library.

Thats it, we are done with the Document management integration of CRM 2011 and SharePoint 2010, wasn’t that easy !

Good to know -

1. Finally All the feature of document management server is provided in the CRM UI itself


1 - Navigate up – For navigating up in the SharePoint location

2 - Create folder – create a new folder in SharePoint

3 - New document - Requires Office 07/10 installed on client, for win2008 Desktop experience feature is required

4 – Upload – upload a document

5 - Edit document – Edit in office application, Office client must be installed on the client

6 - Delete document – Deletes from SharePoint

7 - Open the SharePoint site – Opens in another window the SharePoint site

8 - Check Out – Exclusively lock the document for yourself

9 - Check In – After edit is done check in to commit your change or unlock the document

10 - Discard Check out- Discard whatever you did after checkout

11 - Set alert on SharePoint – subscribe to email alerts on events on the document (eg,: document change, deleted )

12 - Download document – download a copy of the document locally

13 - Copy Shortcut – get the document url in clipboard

14 - Send Shortcut – needs outlook installed on client

15 - View Properties – view the metadata (date modified, author, last modified by, last modified date etc)

16 - Edit Properties – edit the metadata

17 - Versions – Shows different versions of document from previous edits

2. If you DO NOT have list component on SharePoint still you can use the SharePoint libraries to store document. When you will use the documents option in the CRM entity it will ask you for a SharePoint library, Which CRM will show you in an IFRAME (like the good old days of CRM 4 with IFRAME of SharePoint library). CRM 2011 does the IFRAME configuration automatically.


Enter the absolute url of the SharePoint library and you will see it in IFRAME


Now click save and see the library in IFRAMEJ.


3. On the entities we can see the option “Add Location”, this way we can have multiple locations added for content storage, it can be another SharePoint site or a different URL.


clip_image049Notice the URL of the SharePoint, it’s a sub site, OR you could use another folder too. My intention is to have a separate folder for contract documents and another folder for other type of documents.


The result is – the users get the drop down to select where he wants to upload the document.


4. The Edit Location button will give us option to alter the location of the SharePoint folder.


5. Something that you must know .The Option to Remove / Delete added location is nowhere here. You must navigate to Document management settings > SharePoint Document Location. Remember this is the only place where you can see all the SharePoint sites currently used by CRM


I will be back with other parts soon !

Questions/feedback are welcome.

, CRM IFD SharePoint,

Comments (48)

  1. Maruti Ravi says:

    Lets say I have configured 3 document locations called as Deals, Contracts and Pipeline. When the user opens the Account, I would like him to see Pipelines by deafult. Is there anyway I can default that.

    Right now, if I add something to the Contracts then next time any one opens up the form will show the Contracts.

  2. @ Maruti Ravi says:

    In what sequence did you add 3 Document locations ? CRM renders the last Added Document location First, so I assume you did not added Pipelines last.

  3. Scott says:

    When I point the Document Location to a already created Shared Document site, it looks good until I exit CRM and go back in. At that point when I go to the Documents section, I get an iFrame message saying that it cannot display. Do you know how to fix this?

    Thanx, Scott

  4. Ashish Mahajan says:

    Good and informative blog, Anand.

    Good work!

  5. Good and informative blog, Anand.

    Good work!

  6. Anonymous says:

    Anand has come up with some cool articles on the following topics, which I am sure will be useful to

  7. Very good content, congratulations.

  8. Lucas Kurniadjaja says:

    Well done Anand, very informative



  9. Mohammad Shahnawaz says:

    Very helpful and nice article .. release more on the basis of Real Scenario.

    Thanking you

  10. Mostafa Mansy says:

    i had a problem running the command allowhtcextn.ps1 .... but it went right when typing .allowhtcextn.ps1 http://site collection.

    Thanks for you all 🙂

  11. Craig Turnbull says:

    Hi, great doc thanks. I am not too familiar with SharePoint. I am currently running SBS 2011 with SharePoint as standard and CRM 2011 on an 2008 R2 Server. Can you point me in the direction of a document that explains how to create new web app or site as you say for CRM within SharePoint?

    Kind Regards


  12. bhaskar says:

    Hello, Thank you for this perfect article. You have defined each and every step in a very clear and comprehensive manner. Excellent Job!!

    However, I am facing a tiny rpoblem while trying to activate the add-on on the Sharepoint site.

    It doesn't let me activate it and says that "The website declined to show this webpage" Most likely causes: This website requires you to log in.

    I am not sure what's the possible reason for this. I am really new to Sharepoint and a little lost as to what should be done.Also, I checked and I am one of the administrators on this machine. Please help !!

  13. AnkurCrm says:

    Has anyone ever faced the same problem as mentioned by Bhaskar? I am facing it too and it is driving me nuts!!

  14. Philip says:

    You have to enable Sandbox service on SharePoint admin console to enable the Activate button.

  15. manish rao says:

    good detailed description. really helpful

  16. Rushikesh says:

    Very well defined. Thanks!

  17. Hi Folks,

    Thanks for letting your thoughts known to me. Just a quick note - With SharePoint 2013 now released, there is absolutely no change in the integration. So everything in the above procedure remains the same.


  18. Amir Zareei says:

    it was a great post. Thanks for sharing this

  19. mmyers7 says:

    Very helpful and useful - only thing I would add - - you need to make sure the user on CRM has enough rights on the SharePoint site collection utilized.  =]

  20. P2212H says:

    I would like to thank you for the efforts you have made in writing this article. I mostly agree with you most of the point I have subscribed the feed and looking forward for the followup subscriptions.

  21. Karla says:

    How do you filter the documents seen in CRM?  We have some documents by year, and only want to see the current year.  We also set an archive flag on documents that are no longer current but that we must keep for compliance. We only want to see (by default) the non-archived documents.

    We set the default view in SharePoint to take these into account, but it doesn't seem to affect the list of documents we see in CRM.

  22. Vijji says:

    our clients are using CRM as a helpdesk system. They want to integrate SP with CRM. SP will have some reports, scorecards etc. If a user feels something is wrong in reports or scorecard item, they want to allow user to start a workflow in their CRM helpdesk.

    How to do this?

  23. Marcel says:

    Super info... 1 question: we have the list component installed and when we create a document location the result is an IFRAME. Only difference is that we create the document location with a console application in which we use the SDK to create the document location.

    Anyone any ideas...?

  24. MJFPalmer says:

    Really helpful, thanks

  25. Sreedhar7080 says:

    All features are good. But sorting is not working properly. After clicking on sorting, page stops responding.

    Thanking you.

  26. Anonymous says:

    by doing this if i crate a account in crm will it reflate on the sharepoint list ???

  27. Anonymous says:

    can you Please provide me a link, where if i update or create a record in crm than it reflates int he share point site

  28. rooba says:

    CSOM VS SSOM for document library move from one site to another sharepoint site from CRM? what will you recommend? .Currently we are using CSOM .will be helpful if you could give some suggestion?


  29. svenDC says:

    Hi, I do not want de SP list component, just show the SharePoint site in an Iframe, but keep getting 'this content can not be displayed in a frame'. onprem CRM 2011 and SP 2013 on same server and domain. What could cause this?

  30. Anand Nigam says:

    Does the user need separate roles and rights in Sharepoint to Modify / update the document. I mean within the CRM.

  31. nick says:

    The post looks excellent. Does this same sequence/steps work for CRM 2013 with SharePoint 2013??

    Also , if we merge 2 accounts, how does the documents on SharePoint side trated..are they still gonna stay separate or both will be merged or we loose deactivated account docuements??

    Please assist.

  32. suresh sorde says:

    Nice article.. I have a question.. How can i hide 'open sharepoint' button from document location.

  33. Melanie5 says:

    Thank you for the article. It was really helpful. In my Company we use to do the Integration like this but shortly I found this solution which adds a lot more features to the standard Integration, e.g. finally I got automatically an OneNote Notebook saved
    in SharePoint for every customer.

  34. Ravi says:

    Is there a way that i can disable creating a new folder functionality in List Component in CRM. We have disabled the permission to create the folder for libraries in sharepoint, whcih is working fine but list component still shows the new folder menu item.


  35. RoobaManivel says:

    is there a way to show up which folder got uploaded with new document in CRM list component view? like how we show the content rollup in sharepoint

  36. Great article, thanks for sharing.

  37. Monte says:

    I want to see specific account ( say Account 1) document when I click that particular account Document link. I don's want to see all the documents stored for all accounts. I am new to this. Is this by default feature or is it feasible?

  38. Dave the Rave says:

    Is it possible to edit the list component, for example, to disable the menu or some menu items?

  39. Anonymous says:

    In October 2014 I will be giving a talk to the Geneva SharePoint User Group about the integration options between Dynamics CRM and everyone’s favourite document management repository...

  40. Anonymous says:

    In October 2014 I will be giving a talk to the Geneva SharePoint User Group about the

  41. swamy says:

    I am also facing the same problem as > Bhaskar said... even though I am the SC Admin.

    My site is public facing site, does this solution work for Internet facing site?

  42. Ajie says:


    Once a user created a folder for a specific account, can that folder in the document library be viewable from other CRM users? We created a folder for one account and we can see the same in sharepoint but we would like to see the same folder from another CRM
    user from the CRM interface itself. We tried opening the folder using CRM Admin account but we got an error below:


    This content cannot be displayed in a frame

    To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.

    What you can try:

    Open this content in a new window



  43. Thriveni says:

    Thank you. It really works for me

  44. swanl98 says:

    Hi Anand

    Great article. Thanks for sharing it with so much delail description to follow. I am going to follow and set this up on our farm. One thing i like to ask is eventhough i didn't see you mentioned but do these approachs require any change like adding a control
    on SharePoint master page for Iframe to work in CRM.

    Hope to hear back from you soon.


  45. Dave says:

    This is a great article and everything works as illustrated when using Internet Explorer, CRM 2011 and SharePoint 2013.

    One question: Has anyone else noticed browser limitations when using Firefox? Firefox displays a blank iFrame instead of the SharePoint folders.

    Thanks again!

  46. Prashant Bhojani says:

    I just want to know that is this possible using powershell?

  47. Rajkran says:

    I want to fetch some record from CRM and Show in Sharepoint List .

Skip to main content