SharePoint Integration

Purpose: Display a list of files, stored in Microsoft SharePoint, that are related to a specific case in LegalServer.


Cost: $4500 one-time setup fee and $100 per month. Non-standard configurations as described below may require additional costs. Migrating documents to Sharepoint from your existing setup is an additional hourly cost.


Video: Working with SharePoint


Requirements: Microsoft Azure, Microsoft SharePoint (cloud version only)

SharePoint Setup

General Configuration Requirements

  1. Client must provide an Office 365 account. If LegalServer will create the authentication apps in Azure Active Directory, it needs to be a Global Admin account.

  2. Client must provide complete url links to their Demo and Live default SharePoint document libraries (e.g., https://legalserver.sharepoint.com/sites/ms-demo/Shared%20Documents). Live and Demo should have separate default libraries so that documents don't get mixed together.

  3. SharePoint libraries must have the Require Check Out setting in the Versioning Settings set to No for the integration to properly create files everyone can see.


Agencies will need to share a set of Global Administrator Credentials with LegalServer for their SharePoint instances. Agencies should send those via the Secure Messaging Tool. LegalServer staff will create the API listener service in your Azure environment. For organizations that do not wish to share Global Administrator credentials with LegalServer, we can provide your Azure administrators with directions on creating and approving the Authentication apps. LegalServer will still need a standard user account to ensure things are working.


There are multiple ways that we have configured SharePoint with different levels of complexity and cost.


Standard Site Setup

Agencies will also need to identify the default libraries to connect with their Live and Demo sites. These can be in the same SharePoint site or separate sites depending on the Agencies preference. The libraries should not be the same for both the Live and Demo sites. At least one library needs to be identified as the default.


Multiple Library Setup

To configure the multiple library version, you have to start by adding all the sites/libraries to a system lookup - SharePoint Site Library. Plan to include the default location in addition to any additional Sites or Libraries you want to have available.

The name will be viewed in the actual lookup field on your site, so make sure it is descriptive. Both Site Path and Library path should start with a forward slash ("/"). All SharePoint Libraries should be within the same Microsoft Domain/Tenant (i.e. all the URLs start with https://legalserver.sharepoint.com). To figure out what part of the URL goes into the Site Path versus the Library Path, consider the following example - https://legalserver.sharepoint.com/sites/ms-demo/test%20library%202/Forms/AllItems.aspx. The green part is the Microsoft Tenant and not used in the lookup. The teal part is the Site Path and the red part is the Library Path. Finally, the orange part is also not used.


Organizations need not share anything beyond the default SharePoint Site and Library with LegalServer to activate the integration. If you only wish to have one library, the default is enabled by the LegalServer Developer without needing to modify this lookup. If you want the ability to use multiple libraries/sites, you'll need to also add your default library to this list to be able to save there in addition to other places.


This lookup is then used by the SharePoint - Create Folder block to identify where the case folder should be created. The Create Folder block will store the location in the system field of "SharePoint Folder Site and Library" on the specific case file. The block will set that value only if that value is not already set.

EPONA 1 Library per Case Setup

Working with EPONA as outside consultants, we are able to configure separate libraries for each case. This configuration is not standard, so if you are interested in this, please contact Sales for pricing.


EPONA 1 Library per Outreach Setup

In addition to having 1 Library per case, with EPONA, we are also able to setup 1 Library per Outreach. Again, this is a non-standard setup, and contact Sales if you are interested. Creating folders in a given Library for Outreaches is on our roadmap but is not yet available.


SharePoint Authentication

App-Only Authentication

SharePoint authenticates with sites in two ways. The first is App-Only Authentication. This is a global set of credentials that allows LegalServer to display a list of files for the case without the end user logging in. This is used to create case folders, the Drag and Drop features on to the SharePoint Documents block to upload files, and the store emails in SharePoint feature if that is enabled. When this is used, the individual user's data is not included as the file creator.


User Authentication

Individual user authentication is used for other methods of uploading documents to SharePoint. This includes Document Templates, Adding a Document with Case Notes, the Static Add Document form, or the Search for Documents feature. In any of these instances, you will see a "Login to SharePoint" link first. Once you click that and then sign in if necessary, the end user will have a User Authentication token to use any of these features. Documents uploaded via these methods will show as though uploaded by the specific user. User authentication depends on that user's access to the relevant SharePoint Site and Library. If they don't have permissions to create a file in that library, it will generate an error.


SharePoint Features

SharePoint Documents Block

An administrator will need to add the SharePoint Documents block to a case profile once the SharePoint add-on has been activated:

The SharePoint Documents block has a few configuration features to identify.

  1. The first is that it contains a dropdown named "SharePoint Create Case Folder Process". Link here to the Auxiliary process that will create a SharePoint folder. If no SharePoint folder is found, then a link to this process will be offered from the block instead of just a message that there is no SharePoint folder.

  2. SharePoint Query Timeout is another dropdown that identifies how long to wait for the query to fully load. If there are a lot of document and especially a lot of subfolders, then it can take a long time to load the documents. You can choose between short (10 seconds), medium (20 seconds), and long (30 seconds) timeouts. If the query to review the full set of documents in SharePoint takes a long time, the page will finish loading and display an instruction informing you of the long load time. You'll be given a link to the related Sharepoint folder to open it directly in SharePoint instead of displaying in LegalServer.


The configuration options for the site/library location can be safely ignored.


With the SharePoint Document block, you are able to also drag and drop files directly into SharePoint from your desktop. Dragging files into subfolders highlights the subfolder's row and not the whole set of documents, LegalServer will automatically rename the file to remove any special characters. If a file is uploaded via drag and drop and one with the same name already exists, you will be prompted before it is overwritten. File uploads are currently limited to 50mb through LegalServer. Larger files may be uploaded through SharePoint directly.


In the SharePoint Document block, clicking on any of these links will take the user to the web version of Microsoft Office, depending on the user's own settings and which Microsoft products you have made available to users. It is not controlled by LegalServer but by the user's browser and device settings. The documents displayed are now sortable by name or modification date -- Ascending/Descending and Within Folders/Altogether. Sorting by Modification Date is purely looking at all files and then sorting regardless of folder. To reset the list to the default sort, click the reset filter button in the top right, reload the page, or click the Sort by Filename option four times.


SharePoint - Create Case Folder Block

The create SharePoint folder block will need to be on both the Intake Process (for new cases) and an Aux Process (for existing cases). Case folders will be created with the case number of the case as the folder name. Currently, changing the name of that folder will break the relationship.


If you are using Multiple Library/Sites, the SharePoint - Create Case Folder block will now have the ability to "Set SharePoint Site and Library". If left as "No", the lookup is not shown and the folder will be created on the default SharePoint Site and Library (the block will show the library and site paths as read-only text for reference). If you say "Yes", you'll have a lookup to select which location should the library create the folder in.

This lookup is setting the system field of "SharePoint Folder Site and Library" that saves the location of the SharePoint Folder on the specific case file. The block will only set this new system field the first time it is run. If the system field is already filled out, you will need to change the field outside of the SharePoint - Create Case Folder block. This field can be set before the SharePoint - Create Case Folder block is run the first time. This field controls where the SharePoint Documents block looks for the folder. If it is blank, then it will look in the default location. If it is filled out, then that is location the listview will look. Regardless of what is configured on the SharePoint Documents block, it will look at the library set by this field if it is set.


The SharePoint - Create Case Folder block must be configured to select the same library as the system field or no new folder will be created in the intended Library. Submitting a version that does not have it set will create a folder in the other location instead (or in addition).


Uploading Files

When creating a file using a New Style Document Template within LegalServer, it will automatically save to SharePoint. You will have to be logged into SharePoint for this to work. If you are not logged in, you will be prompted to log in to do so. Currently, all Document Templates will save as RTF files, although there is a flag when editing the document that allows you to have LegalServer convert the file from RTF to DOCX. There are no guarantees about the formatting after the conversion, so test in advance. Alternatively, you can create a Power Automate function that will convert all of the RTF files to DOCX files if you want to extend the functionality and make the generated documents editable in Word Online. Old Style Document Templates will not save to SharePoint.


Uploading a file via adding a Case Note will add that file to SharePoint. Using the Static Add Document form will also save it in SharePoint.


Uploading a file via the Attestation on File, Retainer on File, and Affirmative Litigation blocks (all that collect documentation for LSC compliance purposes) will save the document to both LegalServer and to a Compliance subfolder of the case in SharePoint.


Emails to a case require LegalServer Developers adding a configuration flag to your site. Email Support or open a ticket to enable that feature. This would add automatically save the email and any attachments to SharePoint but the attachments will not appear in Case Notes. The text of the email is still parsed for the Case Notes. If a SharePoint folder does not exist for the case, one will not be created. Then the email will be handled as though SharePoint is not configured.


Immigration forms will automatically save the generated forms to SharePoint.


Other blocks (Add Document, Add Document with Title, Discovery, Activities, etc.) will not upload to SharePoint. As other blocks begin saving to SharePoint they will be identified.


Once you are logged in as a user to SharePoint (having clicked the "Login to SharePoint" link in LegalServer), the Document List block will offer a SharePoint icon to move a file from LegalServer to SharePoint. Clicking this link will upload the file and refresh the SharePoint Documents block.

SharePoint Permissions

Permissions within SharePoint are managed within SharePoint. Access to opening files from SharePoint will depend on SharePoint permissions. LegalServer does not set any special permissions or access beyond what is inherited by the case folder. LegalServer does not administer anyone's SharePoint sites and libraries.


If you want to enforce any custom access rules in SharePoint, you will need to consult with a SharePoint expert if you want to leverage information from LegalServer APIs into any business processes or rules. The other option is to set different rules based on the Library and create folders in different libraries.


SharePoint Configuration Options


LegalServer Config Flags

There are multiple config flags that are typically enabled in a new setup of this integration. These can be turned on or off individually by LegalServer Support.

  • Store in SharePoint - This turns on the save documents to SharePoint feature. Without this flag you can still see documents, create case folders, and drag and drop, but LegalServer doesn't automatically save generated documents or replace internal storage destinations with SharePoint.

  • Store Emails in SharePoint - This will automatically save emails sent to the case to SharePoint only if there is an existing SharePoint case folder. The email and the attachments will all save to a subfolder in SharePoint.

  • Search in SharePoint - This enables the Documents Search feature to also check in SharePoint for any relevant documents. Only 10 documents are shown. The search requires the User Authentication and the results will be limited to documents that you have access to already.


There is an additional config flag that can be enabled if needed:

  • SharePoint Permissions - This gives the site admin a configuration option under Document Settings to pick either User Authentication or App Authentication.


Switching/Moving the SharePoint Folder

Top level case folders can be moved from one connected library to another connected library. They cannot be moved into subfolders or non-connected libraries. This requires two steps.

    1. Move the folder from within SharePoint. Do not rename the folder itself. At this point, the SharePoint Documents block will show that the Case Folder no longer exists.

    2. Change the value for "SharePoint Folder Site and Library" field from the old location to the new location. This can happen via Branch Logic, Defaults, or manually. There is no need to re-run the SharePoint - Create Case Folder block. Now the SharePoint Documents block will show the folder again and any files that were in it.


Multiple Folder Configuration Suggestions

One option is to have a process with the new SharePoint Folder Site and Library field as the toggle field for branch logic. On each branch logic form you have the SharePoint - Create Case Folder block set with the destination library.


Another option is to have separate Auxiliary Forms and Processes for each destination location.


PowerAutomate

One benefit of SharePoint is the ability to add in other aspects of the Microsoft suite of tools. PowerAutomate is utilized in the examples below as tested in April 2021. Please realize that creating Flows in Power Automate is done on a site/library basis, so you may need to have multiple copies for multiple libraries. There may also be rate limits and activation caps to consider given larger volumes. Microsoft's products change over time so these examples may not be a perfect match to Power Automate if you go to set them up. LegalServer strongly recommends testing these on your Demo Site and Library first before enabling on your Live site and SharePoint Library.


Creating Subfolders via Power Automate

For example, a Power Automate Flow could be set up to automatically create subfolders for a case once the initial case folder has been created by LegalServer.

The above example creates a subfolder named "documents" in any folder created at the root level of the SharePoint Library named "RTFtoDOC". It only happens at that level and not to subfolders. The Create new folder action could be repeated for additional folders as well.


Converting to DOCX via Power Automate

Another (and unfortunately more complex) option is converting a file to Docx via Power Automate. Due to the nature of the files, you cannot automatically go from RTF to DOCX directly, even with Microsoft's tools. Microsoft does allow you to convert from RTF to DOC. Once in a DOC file, there is an option to convert to DOCX from within Word Online. The following Flow would convert the file to the same name, save it in the same directory, and then delete the RTF file. That last step may be useful if you are only getting RTF files from LegalServer Templates. If you are getting RTF files elsewhere, you may want to add additional Condition steps or remove it completely. DO NOT IMPLEMENT THIS LAST STEP IF YOU DO NOT WANT TO DELETE FILES.

On the first step, you can narrow the Flow's focus to just RTF files by using the menu to open the settings for the step. Then under Trigger Conditions add:

@endsWith(triggerOutputs()?['body/{FilenameWithExtension}'],'rtf')


Once you have the new DOC file, opening it will give you the option to convert to DOCX in Word Online. Converting to DOCX will then leave you with two copies of the file. If you don't want to have that interim DOC file (and are not concerned about other DOC files being converted to DOCX that did not start as LegalServer Templates), you can add a second flow to remove the interim DOC file.

Note that the first step would have a Trigger Condition like above but specifying "docx" instead of "rtf". Then the second step uses dynamic content from the first step, while the third step uses dynamic content from the second (and not from the first).


Again, these Flows may delete the original versions of your documents. If that is a concern, DO NOT IMPLEMENT THEM. Consider additional Conditions or limits on them. Perhaps they only run in certain subfolders or there is a way to mark a file to prevent removal.


Other Integrations

Lastly, some LegalServer consultants have tied in the use of LegalServer APIs to pull additional case related metadata into SharePoint.


Frequently Asked Questions


  • Can we prevent staff from uploading files to the LegalServer document store and force everything to SharePoint? Short answer is: No. There are still several places within LegalServer that don't yet support uploading directly to SharePoint (Activities, Discovery, Services, Time, the Add Document block, or the Add Document with Title block).

  • Can attachments to emails sent to a case be uploaded to SharePoint instead of the LegalServer document storage? Yes. File a support request (Help menu > Support Request) from your site asking to have that feature enabled. There is no additional cost.

  • We don’t want to give Legal Server Global Admin for the configuration; we’ll want to have them walk us through the configuration. We can give you a powershell script and directions that will create the apps necessary. If you want someone to do it through the UI, we have longer directions we can supply. We've also worked with groups who will give us Global Admin settings for a few hours to create the apps and then reduce the permissions down to a standard user once the back end settings are configured. The SharePoint Sites and Libraries can be created after the authentication apps are created.

  • What kind of on-going access will LegalServer need to our M365 environment to support the solution and what level of access is required for them to do their jobs. We request that you supply us with a user account that has read/write permissions to the sites/libraries that are storing LegalServer data. This will let us know if the integration is working and allows us to troubleshoot if there is a problem. The user account does not need an O365 license or access to anything beyond the LegalServer sites/libraries.

  • Will the SharePoint site be accessible to anything/anyone other than the Legal Server application? If users can / should be able to directly access the site, what kind of permissions need to be setup on it? Users should have access to the SharePoint site. They need read/write permissions on the library to be able to add documents or modify them. You can restrict users to only certain libraries. You can also establish user permissions or tie ins to specific folders.

  • Are there requirements for how the SharePoint sites are provisioned? Any SharePoint site will work. The one requirement is that the document check-in feature be disabled. That is enabled by default only on the Document Repository site type.

  • Do we need to create any lists or other items in the SharePoint sites or will the Legal Server product take care of creating any required libraries or objects in SharePoint? We request that you create the sites and libraries that you intend to use. You can have any number of subsites and libraries connected to LegalServer, but we need to know 1 specific default site and library that we will hard code. Other sites and libraries can be added in the User Interface by a site administrator in the future. We recommend two separate sites - one for Demo, one for Live - at a minimum. The standard "Shared Documents" library in those sites is often sufficient for Demo, but many groups want more granularity on Live. For the case folders within the library, LegalServer will automatically create the case folders via the integration.

  • Are there any retention policies that need to be configured or any other policies needed for the SharePoint sites? Not by LegalServer.

  • Are there naming standards for the SharePoint site that LegalServer can provide? No standards are established. Many groups will use "LegalServer Demo" for their demo site and then "LegalServer" for their live site. Other groups divide their Live work between practice Areas - "Consumer", "Healthcare", etc. Case folders are stored in the root folder of the Library. Case folders are named for the case matter number in LegalServer. That folder name is the link between LegalServer and SharePoint and should not be modified unless you intend to break the relationship between LegalServer and the SharePoint case folder.