SharePoint Integration with Microsoft Portal

By | November 19, 2018


Dynamics 365 upgrades often enfold bunch of exciting features and the latest October release which upgrades your CRM to version 9.1 happens to continue the legacy. Amongst all the new features, the one we are targeting in this blog is the SharePoint’s integration with MS Portal. With the commencement of this feature, it would be of much more convenience to categorize and store documents for respective records from the portal in different scenarios such as when the portal user is a Sales Rep and when logs in to the portal can create, edit or view its list of clients and also attach required documents concerning different clients.

The documents can be Invoices or details of authentication etc.

Pre Requisites:

  • The CRM user needs to be an Office 365 Global Administrator to be able to access the Office 365 Admin center and thus enable the SharePoint integration with MS Portal.
  • There integration between Dynamics CRM and SharePoint should already exists.

Below is the step by step explanation of how to achieve the integration.

1. In the Dynamics 365 Admin Center, navigate to your Portal Admin Center

SharePoint Integration with Microsoft Portal

SharePoint Integration with MS Portal

Please Note: To access the Office 365 Admin Center the CRM user needs to be an Office 365 Global Administrator.

2. Now inside your Portal Admin Center you will find the section “Set up SharePoint integration”

SharePoint Integration with MS Portal

3. As mentioned in the above screenshot click on the button “Enable SharePoint integration” and follow the below steps to successfully enable the SharePoint Integration.

  • Click on the Enable button in the screenshot below

SharePoint Integration with MS Portal

  • It will take some time to process

SharePoint Integration with MS Portal

  • It will then request you to sign in to your Microsoft account again. Use your CRM credentials to sign in.
  • After which it will request you to accept the permissions. Hit the accept button to grant the required permissions.

SharePoint Integration with MS Portal

  • And finally its done and you shall get the message as shown below

SharePoint Integration with MS Portal

4. Now once the integration is done you will need to add the document location subgrid in the CRM form which eventually gets displayed in portal.

SharePoint Integration with MS Portal

Please Note:  To view and add the Document Locations sub grid on the respective entity form, there should be an existing configuration between your CRM and SharePoint and also Document management should be enabled for that respective entity (i.e. contact in our scenario).

5. Now as per our scenario we have logged in to the portal as a Sales Representative who have multiple clients.

SharePoint Integration with MS Portal

6. Now when we open the record to edit there you shall see the document locations as below.

SharePoint Integration with MS Portal

Please Note: To view the document location in portal as shown in the above screenshot.

a. The entity form needs to be in Edit mode.

SharePoint Integration with MS Portal

If it’s not in Edit mode below is how it gets displayed

SharePoint Integration with MS Portal

b. You need a child Entity permission pointing to the entity Document Location as well.

SharePoint Integration with MS Portal

Now regarding the Parent entity permission, it can be any normal entity permission pointing to the entity for which you wish to upload the document. In our case, as we mentioned that the documents will be attached against respective clients i.e. contact so we created a Global entity permission for the Contacts entity as below.

SharePoint Integration with MS Portal

Without the entity permission, the below error message gets displayed.

7. Now to shed some light on the functionality, using the button “Add Files” one can add the documents in SharePoint.

SharePoint Integration with MS Portal

On click of the “Add Files” button you are shown a pop up window from where one can chose the file to upload.

SharePoint Integration with MS Portal

Once you choose the file and upload, a folder gets created in SharePoint’s Contact folder following the convention as “Contact Full Name_GUID”.

SharePoint Integration with MS Portal

And the attached document gets displayed in that folder in SharePoint as below.

SharePoint Integration with MS Portal8. And using the button “New Folder” we can create a folder which eventually gets created inside the parent folder “Contact Full Name_GUID” in SharePoint as below.

SharePoint Integration with MS Portal

SharePoint Integration with MS Portal

And from portal you can go inside the folder and then upload a document which gets uploaded inside the respective folder.


SharePoint Integration with MS Portal

Please Note: Whenever a document is uploaded against a new record, a document location regarding that entity’s record (in our case the entity is Contact) gets created in CRM whose owner is “SYSTEM” in CRM.

SharePoint Integration with MS Portal


Thus managing and uploading of documents to SharePoint from portal has become quite convenient thus reducing lot of time and effort and also helping in saving a lot of the Dynamics CRM storage.

Cut short 90% of your manual work and repetitive data entry!

Get 1 Click apps and say goodbye to all repetitive data entry in CRM –
Click2Clone – Clone/Copy Dynamics 365 CRM records in 1 Click
Click2Export – Export Dynamics 365 CRM Report/CRM Views/Word/Excel template in 1 Click
Click2Undo – Undo & Restore Dynamics 365 CRM data in 1 Click

16 thoughts on “SharePoint Integration with Microsoft Portal

  1. Jalak Raval


    I need to Integration SharePoint with Microsoft Portal. I’ve tried to perform the above step as described. I’m performing this integration on the Lead entity. I’ve created Entity Permission for Lead and Document Location entity as described.

    After all the configuration when I’m trying to create/edit the lead entity record from the Portal side. Below is for your reference.
    We’re sorry, but something went wrong. Please try again, and if this persists, contact the website administrator.
    Error ID # [fe36cb53-d8bb-46aa-b2f6-deea446446f8]
    We’ve been notified about this issue and we’ll take a look at it shortly. Thank you for your patience.

    3/5/2019 12:35:22 PM UTC
    GBR a3ab9b21-9923-474d-a48a-ac9d1db5190d
    Can anyone help with this? Any help would be appreciated.

    1. inogic

      Please check if you remove the Document Location subgrid from the Lead entity form then can you still edit the lead record or not.

      If then also you are getting the same error then there are chances you have some customization issue in the entity form used in the portal.

      Kindly refer to the blog to refer the issues one usually come across in portal.

      You can also use portal option “Enable Diagnostic Logging” to get further details on the error.

      Hope this helps!

  2. Tom

    Do you have any idea on how to restrict the file type which can be uploaded?

    I’m able to upload .exe files however that extension is blacklisted in the CRM system settings.

    Nice article, Thanks!

    1. inogic

      There is no OOB way to restrict files with certain extensions from getting uploaded in SharePoint. But one way to cater this would be to create a workflow in SharePoint to restrict upload of a file with the particular extension, or maybe you try by writing a custom JavaScript on the portal page to restrict the certain file types.


  3. Comm


    Actually on portals side the add files button is not triggering.

    1. Inogic


      We tried to replicate the issue you are facing at our end. But in our scenario the Add file button is still working & Add file pop-up screen is appearing in portal as you can see in the below image.


      Kindly reconfirm the steps & if you are still facing the same issue, please share the screenshot.


  4. Mikkel Pedersen Kaas

    While this post is a bit old is still seem to be up to date regarding sharepoint documents. Do you know how having multiple document locations would be handled in Powerapps Portals? As far as I understand, the current functionality doesn’t allow users to select a document location.

    1. Inogic

      Yes, you are correct. The current functionality doesn’t allow users to select a document location.

    2. Himanjan

      Hi Mikkel,

      I am trying to display sharepoint documents in powerapps portal can we just diaply the documents from a library to anonymus users?

      1. Inogic

        As per your requirement mentioned, if you want to display the Documents present in Sharepoint Document Location sub-grid to Anonymous Users you need to add the Web Role of Anonymous Users in the Parent Entity Permission you created as per our blog.

        Sharepoint Document

        Hope this Helps!


  5. Alexandros P

    Extremely interesting walkthrough and is working 🙂 nice job
    may i ask you in new D365 dynamics portals to configure multiple document locations per external user? Each external User is a contact and a customer back at D365 sales
    Thanks in advance, kind regards

    1. Inogic

      The CRM contact becomes the user in Portals. i.e. in portal you need to login with CRM contact. And if you configure SharePoint document location for contact then in SharePoint there will be different folders for each contact under the contact location.

      For Example: Suppose you uploaded documents in two different contacts then in SharePoint there will be two separate folders for each contact under the contact location as shown below:


      Hope this helps.


  6. Haseeb

    How to take SharePoint file delete privilege from portal user? I have tried from entity permission but its not working
    Thanks in advanced.

    1. Inogic

      Hi Haseeb,

      It seems you want to restrict the delete for some portal users.

      To do that you will have to create a new Web role and assign it to the users for whom you want to restrict the delete. Then you need to create another set of Parent-Child Entity permission similar to the ones mentioned in our blog but without providing the Delete privilege for the child permission i.e. the Document Location.

      Now associate the newly created Web role to the new global permission and you shall see the delete button doesn’t show for the users assigned with the new web role.

      Please Note: The users with the new web role should not have any other web role assigned which is associated to permission having the Delete privilege assigned for Document Location entity.

      Hope this helps!

  7. Sohail Yousaf

    I have a case entity in Portal where I want to create SharePoint folder on the base of each Case record in SharePoint
    like Client /Case1 / All Files

    How can I achieve this ..

    THANKS in Advance

    1. Inogic

      Hi Sohail,

      While configuring your Document Management Setting from your CRM make sure that the option Based on Entity is checked for the folder structure and that you have selected an Account/Contact as below:

      Doing so will ensure, that whenever you upload a document associated with a Case record, the folder structure will be Contact//incident//file

      Please note in the above structure, the contact will be the one that is associated with your Case/Incident. Also, please note the above folder structure is only valid if you are uploading the document from an entity associated with Contact. Instead, if you directly upload the file from Contact then the folder will be Contact//file.

      Hope this helps,

Comments are closed.