Enable/Disable Modern UX in SharePoint Online with PowerShell & CSOM

Microsoft has announced the rollout of several new enhancements to SharePoint Online team sites in Office 365. These  enhancements are the Modern UX for Team Site publishing pages/new web parts and OneDrive for Business sites in SharePoint Online in Office 365. Modern lists and support for Microsoft Flow and PowerApps, Modern Document libraries, Site Contents Page of Team sites already have the modern UX. A default out-of-the-box setting is available in Office 365, SharePoint admin center to switch the Design mode to the New Modern UX or to stay Classic.

Note: We need to note that `classic’ experience is not deprecated and both `classic` and `modern` will coexist.

In addition to these, we need to control the settings to implement the new design for multiple sites in an Office 365 environment. There are PowerShell commands available that you can use to add or remove hidden features related to the new Modern UI, at Web or Site Collection level using the popular CSOM.

We need to understand the reasons to switch from Modern UX to Classic at various scope levels.

  1. When you have customizations that affect document library pages.
  2. Whenever the pages represent business-critical functionalities.

We can determine which sites and site collections have to be changed to Classic using the following PowerShell script with a CSOM.

Please follow the given steps using SharePoint Online Management Shell to enable or disable Modern UX for SharePoint Online Team sites using the CSOM model.

Step 1 – Add the assemblies to Run the following in SharePoint Online Management Shell

Add-Type -Path “C:Program FilesSharePoint Online Management ShellMicrosoft.Online.SharePoint.PowerShellMicrosoft.SharePoint.Client.dll”

Add-Type -Path “C:Program FilesSharePoint Online Management ShellMicrosoft.Online.SharePoint.PowerShellMicrosoft.SharePoint.Client.Runtime.dll”

With the latest SharePoint Online Management Shell installed the above assemblies should be in your “C:Program FilesSharePoint Online Management Shell” folder as shown below.

Steps 2 – We need to load the variables for your Site Collection and Web as required. Provide a global administrator credentials in the below code snippet.

Step 3 – Change the Classic experience for sites/site collections.

To change the Classic experience for document libraries on a site collection/Site Contents Page, we need to REMOVE the feature ‘E3540C7D-6BEA-403C-A224-1A12EAFEE4C4’ from Site Collection feature definition.

To switch your Site Collection to New UX, run the following code snippet:

To switch your Site Collection to Classic mode, run the following code snippet:

Step 4 – Change the Classic experience for Web/Subsites in a site collections.
To change the Classic experience for document libraries on a Web/Subsite, we need to REMOVE the feature ’52E14B6F-B1BB-4969-B89B-C4FAA56745EF’ from Website’s feature definition.

To switch your Web to New UX mode, run the following code snippet:

To switch your Web to Classic mode, run the following code snippet:

We can login to the site/site collection and test the Site Contents page on your SharePoint Online site in Office 365.

With the Modern UX in SharePoint Online in Office 365

Below picture represents the Classic UX in SharePoint Online in Office 365

Word Automation Services for SharePoint 2013


Word Automation Service is a service provided by Microsoft in SharePoint 2013 to perform conversion of documents that are supported by Microsoft Word. The conversion that happens is purely server-side conversion. This service existed in SharePoint 2010 version as well. The main change in this service from SharePoint 2010 to SharePoint 2013 version is the implementation of requests for “on demand” file conversion.


In SharePoint 2010, whenever the conversion request was sent to the server it was required to create a file conversion job and by using “Start” method, the conversion job would be started. Then the conversion would actually happen based on the interval set in the properties of the Word Automation service in Central Administration. The properties in the Automation Service can also be used to set how often the timer job needs to run and how sooner it needs to start with the minimum value being one minute.

Current Scenario

In SharePoint 2013, Microsoft has maintained the earlier 2010 feature and also added “on demand” conversion to easy the burden on the developers. This feature will enable the request to be executed as soon as the request is created. Think of “on demand” as a synchronized process wherein the job is executed without any delays. Whereas, the other way is an asynchronous process which waits for some amount of time specified in the properties.

In SharePoint 2010, it was possible to convert only those documents which were present in SharePoint library. In SharePoint 2013 the conversion job can also convert the documents present in the file system using file streams. Since the file stream uses Word Automation Service, it can convert only one document at a time.


The above figure shows the architecture and the request processing method of the Word automation process from the server object model. The Word automation process maintains two queues for both kinds of processes. One queue for the “on demand” or immediate requests and the other is for SharePoint timer-job based requests. The document conversion request of “on demand”     will always get prioritized over the timer-job based requests.

If the Word automation service is already working on the timer-job based request and it receives an “on demand” request then it will immediately stop the earlier conversion job and execute the “on demand” request first.


  1. Open Central Administration and click on Manage Service Applications.
  2. In the service application list on the top ribbon click on “new” and click on “Word Automation Services”.

3.  A modal dialog box will open up as show below:

4.  Fill in the details as described below:

    1. Name – Name of the word Service example – TrigentAutomationService
    2. Application Pool Name – Preferably same as the name of the service example – TrigentAutomationService
    3. Select the security account that has been registered
    4. Partitioned Mode – No need to check this as there is no requirement of partition
    5. Add to Default Proxy List – check this – This will create word service in the proxy list
    6. Click on “Next”

5.  On click of “Next” you will be asked to give the database server and the name of the database where the service resides. It is advisable to give the same server as the Sharepoint DB

6.  Click on “Finish”. The Word Automation Service should get created successfully. It may take some time depending on the response of the system. It will be listed along with the other services as below:


Once the service is created successfully we need to modify the properties depending upon the requirement.

  1. Supported File Formats – This is used to specify what all file types can be opened by the service.
  2. Embedded Font Support – A user can choose to embed fonts within the document.
  3. Maximum Memory Usage – Maximum percentage of memory that can be used by the service from 1 to 100.
  4. Recycle Threshold – Number of documents converted by a conversion process before it is restarted.
  5. Word 97-2003 Document Scanning – Extra checks are performed before these documents are opened.
  6. Conversion Processes – The number of conversions that can be performed simultaneously.
  7. Conversion Throughput – The frequency with which groups of conversions are started in minutes.
  8. Job Monitoring – The length of time before conversions are monitored in minutes.
  9. Maximum Conversion Attempts – Maximum attempts before it is considered as failed
  10. Maximum Synchronous Conversion Requests – Maximum number of synchronous conversion requests that can be processed at a time for a server.

Business use cases

While Word Automation Service does the job of converting documents from one format to another it certainly does have multiple business uses such as –

  • An application where in the users inputs certain information and that information gets saved in a SharePoint list or library. A background code can be written to gather the user input information and create a word document. This document in turn can be used by the word automation service to convert it from word to PDF so that the document could be shared offline. This application could be as simple as generating a ticket or as complex as generating health and safety plan for any construction companies. It can have multiple input screens and multiple lists as well.
  • An application which allows the user to upload their word files with the relevant inputs and stored in a location. Word Automation Service can be used to convert these files into PDF or XPS format. It can be made to be downloaded by the user for printing or using it offline.
  • An application where based on user inputs certain pre-selected documents should attached from a source outside of SharePoint. Word Automation Service can be used to select that document and convert it and made available to the user for download.

Understanding SharePoint Framework (SPFx) – Developers’ Perspective

Our recent webinar on ‘Introduction to SharePoint Framework’ (SPFx) attracted very active participation from a large number of developers.

This blog gives a brief overview of SharePoint Framework followed by answers to questions from the participants of that webinar.

Understanding SharePoint Framework:

As Microsoft says, “The SharePoint Framework is a Page and Part model that enables client-side development for building SharePoint experiences. It facilitates easy integration with the SharePoint data, and provides support for open source tooling of development.”

SPFx offers excellent opportunities for new interactions and user experiences. It is a mobile-first and cloud-first Microsoft initiative with an open and connected platform and client-side development model. SPFx’s light-weight components and responsive design support dynamic user experiences for desktop and mobile device browsers.

Given below are the answers from our presenters, Guruswamy Jetti and Abishek Bhat to questions from the participants:

What technologies should I learn to work on SharePoint Framework?

While at this point in time, the SharePoint Framework Client-Side Web Parts uses TypeScript, React or Knockout.  However, you can use any JavaScript framework. There is no particular recommendation with regard to which framework you should use. Different frameworks excel in different scenarios and you are free to choose one that meets your needs.

Are there any limitations of SharePoint framework? Can you customize all aspects of SharePoint framework, i.e. event receiver, time job, workflow, etc.?

Based on our experience in customizing SharePoint frameworks, we can say that:

  1. Single column layout in the new Page Model is not suitable for all scenarios.
  2. Elevation of privileges
  3. Master Page and Page layout customizations

As of now, for event receivers, web hooks can be used.  For the others, we don’t have any information or documentation.

Should developers learn Yeoman, Gulp and Typescript?

SharePoint Framework uses open-source toolchains that work seamlessly across different operating systems. While it’s not necessary for you to have extensive knowledge of the tools used by SharePoint Framework, having a basic understanding will help you be more productive when building solutions on the SharePoint Framework.

Is it necessary to use Azure storage account for CDN? Can’t we upload files and web parts on SharePoint site?

No. Artifacts may be deployed to a CDN, SharePoint list, or Azure web site.

How are Business Objects and Tableau different from Trello and SharePoint?

The two products mentioned are mainly used for Business Intelligence. SharePoint Framework, however, is a toolchain and is used to develop client-side web parts.

Will the way we currently work with apps continue to be supported, along with a SharePoint framework? What does the roadmap look like?

SharePoint Framework doesn’t deprecate or replace any of the existing models. On the contrary, it complements them and we are confident that the most powerful SharePoint customizations will be possible by combining different models and making them work together.

Do we need to wait for the general availability of SharePoint framework?

As of now, SharePoint Framework is available in preview so we cannot use it for production due to possible breakages. Please go through the roadmap provided by Microsoft.

Can we connect to external data resources from SharePoint using SPFx?

The SharePoint Framework will be used for client-side web parts development.  Working with specific data sources may need different nuances.

In terms of security which one is better:   SPFx or app model?

Add-in/app-part model, as SPFx still has to be available for general usage and this will be executed in the current page context.

Do we have branding options in modern sites like we have in classic SharePoint using page layouts and master page?

We hope Microsoft hasn’t mentioned any changes related to branding. Pages and team sites are updated and as far as we know, we will have options. It is too early to comment on the same.

Does the editor which you demonstrated, have the folder structure as created by Yeoman generator?

Yes, it’s using Visual Studio Code which was developed by Microsoft and open source code editor. We can use other open source tools like ATOM, Sublime and others.

Can it replace the way it farms solution capabilities when it comes to on-premise like CSOM has?

SharePoint Framework doesn’t deprecate or replace any of the existing models. SharePoint Framework can be used for client side customizations if it suits your requirements.

Can the coding model be SSOM/CSOM/JSOM/REST APIs?

For SharePoint framework, we need to use JavaScript framework and REST API for dealing with lists etc.

Which is the recommended framework between React / Angular JS?

You may use any JavaScript framework,  and there is no particular recommendation on the JavaScript framework. Different frameworks excel in different scenarios and you are free to choose one that suit needs the best.

Is this in Visual Studio or any other software?

Yes, we are using Visual Studio Code which was developed by Microsoft and is an open source code editor. We can use other open source tools like ATOM, Sublime, and others.

Can SharePoint framework use Microsoft Flow, Delve etc. capabilities?

Modern team site pages are fast, easy to author and support rich multimedia content. And pages look great on any device, in a browser or from within the SharePoint app. These modern pages are similar to Delve pages so they can be easily integrated with Delve, Microsoft Flow and Microsoft Graph.

View the webinar: https://youtu.be/0LAjvvdxQ4c

Configuring Workflow Manager in SharePoint 2013

Workflow Manager is a multi-tenant host for running and managing Windows Workflow Foundation workflows, and supporting high scale and high density execution. Workflow Manager builds on the Windows Workflow Foundation programming model, run time, and activity library in the .NET Framework.

When you install SharePoint 2013 in your server only 2010 workflows will be available in SharePoint. To work on SharePoint 2013 workflows, you should install and configure the workflow manager in the server.

Given below are the steps to configure your Workflow Manager:

  1. Ensure you have installed the SharePoint 2013, SQL, Active directory in your server.
  2. Ensure SharePoint related services are running.
  3. Install workflow manager and select default values, click finish and exit.To download the file: https://www.microsoft.com/en-gb/download/details.aspx?id=35375
  4. Install Cumulative updates for workflow manager and service bus.
  5. Now open workflow manager to configure.

  1. Give DB name and required details
  2. Give admin account for configuration.
  3. Select HTTP
  4. Give subscription key as configuration key (example: Zebra#@!)
  5. Click next
  6. Give same details for service bus configurations.
  7. Click finish

Go to IIS manager, select workflow management site under `sites’, click on browse 1229: http and note down the Url.

Open workflow management PowerShell and run the following script:

Register-SPWorkflowService -SPSite “http://localhost:port ” -WorkflowHostUri “http://localhost:12291″ -AllowOAuthHttp

SPsite will be your site collection URL and workflowHostUri will be your workflow manager site Url you just copied in the above steps.

if you get an error,  please run Add-PSSnapin and give the name as ” microsoft.sharepoint.powershell.

Then you go ahead and check whether SharePoint 2013 workflow option coming or not in designer. Create one test workflow. If you get the error while publishing below are the troubleshoots.

  1. Check whether the App Management Service application is created, if not then create the App Management Service application.
  2. Click on “Configure service application associations” available under the Service Applications section.
  3. Check whether the App Management Service proxy is added to the default proxy group, if not then add it to the default proxy group.
  4. Check whether the App Management Service is started, if not then start the service.
  5. Please refer 🙁http://www.c-sharpcorner.com/UploadFile/anavijai/error-app-management-shared-service-proxy-is-not-installed/) or follow below steps.

Understanding Representational State Transfer (REST)


SharePoint 2013 introduces a Representational State Transfer (REST) service that is comparable to the existing SharePoint client object models. REST allows for a minimum data to be passed using the same well-established mechanism that defines the web without a lot of the encumbrances introduced by fatter protocols. It allows programmers to build programs easily that access and act upon data exposed via APIs, even in environments with unreliable network speeds and limited computing power. REST works almost exactly like a website in a browser. A resource is exposed to a program via a URL. This means the developers can perform CreateReadUpdate, and Delete (CRUD) operations from their SharePoint Add-ins, solutions, and client applications, using REST web technologies and standard Open Data Protocol (ODATA) syntax. ODATA standard defines a set of best practices for building and consuming RESTful APIs.

Continue reading “Understanding Representational State Transfer (REST)”

Comparing SharePoint Migration Tools

Microsoft SharePoint periodically releases newer versions with advanced features. There is value-add in every release, making migrating to newer versions beneficial for customers. The migration process can be executed using a manual approach or with a tool.  in case a tool is preferred, it is important to note that there  are several tools available today that support SharePoint migration from older to newer versions. Please note that the migration process is difficult, especially if you have an older version and want to target SharePoint 2013 or SharePoint 2016.

Hence, if you directly jump to SharePoint 2013 or SharePoint 2016, I strongly suggest that you would consider using a tool. This will ease the steps involved and avoid intermediate hop environments.

In this blog, I will discuss the salient features of some popular tools.


Sharegate has a simple user interface suitable for any IT or business user  who would like to migrate their content. The tool is efficient, and  if the content structure is not complicated one can move site, contents, users or permissions easily.

SharePoint is a content management system, hence we consider the amount of data transferred from source to target environment. Based on this, I believe Sharegate is the ideal tool for large data, because the license permits unlimited data migration. This will be useful for a test run and for migration of content to multiple environments like staging and production. The tool has license variance for single user and multiple users. Sharegate has support for migrating Nintex workflows and Nintex forms, which have  a different license value.

Sharegate’s support structure is appreciated. It has good online documentation, with video tutorials. For a specific query, one can send an email to the support team who typically respond within 24 hours. The support team will be available for an online meeting session to interact with the technical team.

The challenging factor is, the tool has limited functionality to schedule and execute a delta migration. Using Sharegate, it is difficult to transform the content structure between source and target environments. This is applicable for migrating user’s Mysite and the profile.


As with any other migration tool, Metalogix is used to migrate sites and content to newer versions of SharePoint – on-premise and online. The tool has extensive features to set up new site infrastructure and reorganize  content during migration. Metalogix has a rich interface with several features and settings enabled for migration from different sources.

We always welcome a job completed during the idle time or off business hours. Using Metalogix, we can schedule a series of jobs, hence the content is moved to target the environment on a convenient time thereby reducing impact while saving time. Metalogix site has a `help’ section with helpful documentation on migration and tool support. The awesome support team from Metalogix will be available for any technical support.

From another standpoint, Metalogix license is based on the amount of data being migrated. Hence, it makes you rethink your decision, especially if you have to migrate a huge content base with no customization. The feature loaded interface, makes it complicated for a business user and invites a technical person with good migration experience.

Other Tools

There are several other tools that help with migrating content to SharePoint on-premise or online.

AvePoint is one of the most commonly used among SharePoint customers.  This tool comes with DocAve migrators which supports all stages of migration such as pre-analysis reports, planning, migration and reporting. DocAve content managers along with migrators will make an easy restructuring of the content, on-the-fly.

Quest is a migration tool from Dell, which comes with two variances, i.e. Migration Suite for SharePoint and Migrator for Notes to SharePoint. Migration suite for SharePoint will support migration from previous versions and from some cloud storage, whereas,  Migrator for Notes has the features to migrate from Lotus Notes to SharePoint and Office 365.

Comparison Matrix

This link contains a comparison matrix of some popular tools used for SharePoint migration.



All the tools analyzed above are designed for SharePoint migration, which avoid content database attach method and multiple hop environments. Each tool has a set of distinct features, which makes it different. This comparison makes it easier to choose the tool, based on relevancy.

Uses of Office 365 Planner

Challenges in the modern work place:

Recently, we have come across multiple challenges in the modern work place, such as:

  1. Users work from multiple locations
  2. Most of the user’s time goes in looking for information
  3. Failure to coordinate across units and users
  4. Microsoft project server is too complex or too robust for their needs. So users simply turn to Microsoft excel for managing projects and tasks.

The Microsoft Office 365 lineup introduced a new and improved way for business using Planner tile in office 365 Launcher. Office 365 Planner has  been rolled out to all eligible Office 365 customers, including Office 365 Enterprise E1-E5, Business Essentials, Premium and Education subscription plans.Customers with these subscriptions, will see the Planner tile in the Office 365 launcher when it becomes available.

Office 365 Planner is a new project management, enterprise-ready and globally available team collaboration app that lets you assemble team work organize visually and easy to use, assign and update tasks, share files, chat and more.

Office 365 planner’s key aspect is the `Hub’, where we can visually see plans and tasks along with overall progress and can go through each task. We can see who is on time and who is falling behind in the hub. The pllanner utilizes the concept called `Boards’ , to keep team work organized in each board. Boards are individual cards, which will have their own due date, conversations, attachments and categories. Cards can have attachments (images,documents etc) to assess information in just a single glance. Cards can be represented as columns called “Buckets” and buckets can be prioritized and color coded in the planner. Visual dashboards and email notifications help to keep everyone informed on progress.

With Planner,  users and teams can create plans and each new plan automatically creates a Office 365 group. Users can create a “Task” and its details as shown below.

Conversations in the Planner will be accessible in Outlook 2016, web Outlook and in the Outlook app as well. The Planner is tightly integrated with conversations, calendar and OneNote etc. We have the option to select and remove favorite plans in the planner hub.

Planners support  technical requirements larger organizations demand, including multiple redundant backups, instantaneous recovery and HIPAA, FISMA, ISO27001 and EU Model compliance.

We have options to add members to the plan and that member will be automatically added to Office 365 Group related to that plan.We have charts in Office 365 planner . These charts will display the summary of the tasks visually as shown below

Planner app hosted on the azure environment and developed using Microsoft graph API as shown below:

Office 365 Planner enters a competitive world which includes other softwares like Trello, Atlassian’s JIRA Core and Asana. Planner will fill Microsoft customers’ need for a more lightweight, easy-to-use tool and replacement for SharePoint Tasks, which were removed well ahead of Planner’s initial debut.

Advantages of the Planner when compared  to other applications are

  1. Lightweight and easy-to-use tool.
  2. Integrated with Office 365 as an online app.
  3. Enterprise-ready and globally available app.
  4. Visualization might give planner thumbs up over competitor.
  5. Cute color-coding to denote task progress.

Some of the new features Microsoft plans to introduce over the next few months are:

  1. Ability to assign a task to multiple users.
  2. External user access and assigning task.
  3. Customizable boards.
  4. Plan templates.
  5. Apps for iOS, Android and Windows.

What is SharePoint Sprawl?


SharePoint Sprawl explains a situation where an excessive number of unattended or rarely used SharePoint sites and content, farm. A perusal of such sites will have outdated information or unknown ownership. SharePoint sprawl happens when an organization implements content management in the enterprise without rethinking it’s usage or plan structure.

Generally, a SharePoint site in an organization consists of sites, lists and document libraries, which can get out of control if suitable governance is not applied.

Why SharePoint sprawl is necessary

  • A site having several non-managed sub-sites will complicate the process of identifying content, by screening through every site. This will lead to more resources as a result of storage of duplicate documents in multiple sites. For example, project documents and templates uploaded in every project site.
  • A migration to future versions of SharePoint becomes a difficult task when duplicate sites or unused sites and content exist in the source platform.

How to avoid SharePoint Sprawl

  • Ensure duplicate sites are not created – Apply proper governance in the SharePoint farm to restrict permission to create new sites. Create an approval process, requesting user for justification of their site request, and there-by confirm none of the existing sites can be utilized.
  • Implement a strong governance plan – Governance can apply permission based on organization rules to create, manage and archive SharePoint sites. This will enforce a set of guidelines while creating new projects and allocation of team members permissions.

SharePoint Files – What happens to old/unused files

In many organizations, SharePoint is used as a source for file share. Migration phase in SharePoint is when documents in SharePoint will grow, if not managed properly. Once all documents from a source environment is migrated to target; those files which are never relevant in newer environment will become idle. During migration all unused file share sources need to be replaced.

SharePoint Sprawl – Implementations in SharePoint 2013

Organize documents in SharePoint and configure into multiple views, tagged with metadata. Each view in the library is considered as a virtual folder displaying content relevant to the view. With SharePoint 2013 expanded enterprise search capability and new features of SQL Server 2008 R2, there is a way forward for SharePoint to store content virtually in CMS.

The new feature Remote Blob Storage(RBS) in SQL Server 2008 R2 enables the rerouting of original file types to peripheral storage (save into Windows file system) rather than SQL database storage. When these large volume files are routed peripheral storage via RBS, they appear to be in SharePoint for user’s view (in a way, secured and administered from SharePoint) but they reside beside the database, and it is a Windows file system. The SQL Server will have reference to the file in physical location, hence make the process cheaper and more efficient than SQL storage. This will lead to efficient best practices with regard to content management and put an end to SharePoint sprawl.

Creating Custom Master Page Using Design Manager

Design Manager is a collective set of pages and functionality in SharePoint 2013 that guides users through the design process. It gives one the ability to map a local drive to a site’s Master Page Gallery and import HTML and CSS files into SharePoint. From there, SharePoint actually converts the HTML files into a Master page.

Given below are detailed steps on creating a Custom Master Page using Design Manager.

Please note that Design Manager is only available on sites with the publishing features enabled.

Step 1: Welcome

Welcome screen which display two useful links:  ‘Import a design package’, and ‘Pick a pre-installed look’.

Import a design package: On this screen user can upload design package and apply the branding to the site.

Pick a pre-installed look: User is directed to ‘Change the look’ screen. On this screen the user can select suitable theme and apply.

 Step 2: Manage Device Channels

This screen shows the device channels already set up on the site and gives options to set up additional device channels. Using device channels, different master pages for different devices or browsers, can be applied through the use of keywords that SharePoint looks for in a requesting browser’s user agent string.

 Step 3: Upload Design Files

Here, map a network drive to Master Page Gallery (/_catalogs/masterpage/) and move all branding assets into the SharePoint site.


  • Depending on your version of Windows, the steps to start mapping a drive are slightly different:
  • Note: Internet Explorer users, right-click the link and select ‘Properties’. Copy the location displayed beside Address (URL).
  •  Copy the URL provided in step 3 of the Design Manager (marked ‘1’ in above image).
    –  In Windows 7 or Windows Server 2008/2008 R2, click Start > right-click  Computer > map network drive
    –   In Windows 8 or Windows Server 2012, open the Start Screen, type Computer.  Right-click Computer and select Map Network Drive
  • Choose your drive letter
  • Paste the URL you copied from the Design Manager into the Folder field
  • Select whether you want the drive to reconnect at logon. Click Finish and Windows Explorer opens and displays the contents of the Master Page Gallery in all its glory.

In the previous versions of SharePoint, master pages and page layouts were placed in the Master Page Gallery and custom CSS, images, and scripts in the Style Library or other document library. In SharePoint 2013, all branding assets CSS, images, scripts, master pages, and page layouts are placed in the Master Page Gallery.

Create a new folder within the mapped Master Page Gallery and copy all the branding assets into this folder.

If you are using SharePoint Designer 2013, follow the below steps:

  • Open the site
  • Select ‘All files’ from left navigation
  • Navigate to _catalogs > masterpage folder
  • Create new folder to hold all the branding assets [Example folder name ‘Trigent’]
  • Copy paste the files into this folder

Step 4: Edit Master Pages

Here are options for converting an HTML file to a master page, or creating a blank starter master page. Below that, there are two master page files (oslo.master and seattle.master, SharePoint 2013’s out-of-the-box master pages) that have successfully converted.


  1.  Click Convert an HTML file to a SharePoint master page.
  2. In the Select an Asset dialog, browse to your Trigent folder within the Master Page Gallery, and select the Trigent2013.html file. The Location (URL) field at the bottom of the Select an Asset dialog shows the filename of the selected file

  • Click the Insert button.
  • After a few seconds the Design Manager refreshes, your Trigent2013 file is listed, and its status reads Conversion Successful.

If for some reason your conversion is unsuccessful, you’ll receive a status of Warnings and Errors. If you click the Warnings and Errors link, SharePoint will try to point out where you went wrong.

Generally, it’s due to malformed HTML. Because SharePoint parses through the document, your HTML needs to be XML compliant—make sure tags are closed in the proper order and tag properties are properly enclosed in quotes; and just generally make sure your HTML has the correct syntax.

Validate your HTML using online HTML validator https://validator.w3.org/

  •  Your DOCTYPE needs to be listed in all uppercase letters.
  • Don’t include any <form> tags in your HTML document; SharePoint adds a form automatically during the conversion.

On successful conversion, click the Trigent2013 filename and you can see a preview of your master page.


When creating your own HTML design, you might find it helpful to add a comment to the beginning of the content that will be a page layout and another comment at the end like <!– START Page Mid Content –> to <!– END Page Mid Content –>, so it’s easy to discern where you will move the placeholder at this point.

For this example assume there are 3 sections header, mid content & footer.

  •  Opened Trigent2013.html from the mapped drive in HTML editor. You should also see a corresponding Trigent2013.master file, but you’ll only be working with the HTML file. SharePoint automatically updates the master page file with any changes you make in the HTML file. If you don’t see the master page file, you may just need to refresh the Windows Explorer window by pressing F5.
  • Assuming the mid content div (<div class=”mid-content”></div>) tag is placed between comments <!– START Page Mid Content –> to <!– END Page Mid Content –>, select all the content inside mid content div tag.
  • Cut (Ctrl+X) these lines from the HTML file. (Don’t delete them!) Create a new page in HTML editor and paste (Ctrl+V) the lines in the HTML for later.
  • Save the Trigent2013.html file, and switch back to the preview of your master page in the browser. On refresh you should see the master page with the empty mid content.

  • Now its time to move the placeholder into the mid content area of the page. Scroll to the bottom of the HTML and find the following block of code.
<div data-name="ContentPlaceHolderMain">
 <!--CS: Start PlaceHolderMain Snippet-->
 <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
 Assembly="Microsoft.SharePoint, Version=, Culture=neutral,
 <!--MS:<SharePoint:AjaxDelta ID="DeltaPlaceHolderMain" IsMainContent="true" runat="server">-->
 <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderMain"
 <div class="DefaultContentBlock" style="border:medium black solid;
 background:yellow; color:black; margin:20px; padding:10px;">
 This div, which you should delete, represents the content area that your Page Layouts and pages will fill. Design your Master Page around this content placeholder.
 <!--CE: End PlaceHolderMain Snippet-->
  •  Cut this code from the HTML (Ctrl+X) and place the cursor within the <div class=”mid-content”></div> tags. Press Enter to create an empty line between the opening <div> and closing </div>.
  • Paste the code snippet (Ctrl+V) in the empty line between the mid-content div tags. Save Trigent2013.html. The preview should update with the yellow block in the mid content area.

  • Delete the text and yellow box this is simply to help you locate the div to position it properly. Select and delete the following content
<div class="DefaultContentBlock" style="border:medium black solid; background:yellow; color:black; margin:20px; padding:10px;">
 This div, which you should delete, represents the content area that your Page Layouts and pages will fill. Design your Master Page around this content placeholder.
  •  Save Trigent2013.html and return to the browser and refresh the master page preview. You should see your master page with an empty mid content area.


The Snippet Gallery is a collection of code snippets for various pieces of SharePoint functionality that you can use in your master page. Each snippet is found on the gallery’s ribbon. On selecting the snippet display the actual snippet of code that you can copy and paste into your master page, and an expanding accordion set of options that you can use to make changes to the code snippet if you want.

There are actually two versions of the Snippet Gallery: one for master pages and one for page layouts.

Snippets link is present at the upper-right corner of the page, above the ribbon preview. The Snippet Gallery opens in a new browser tab, so you can easily switch back and forth between the gallery and the master page preview.


  1. Switch to the Snippet Gallery and click the Site Logo snippet in the ribbon.
  2. Scroll down the page to the Customization – Site Logo (SPSimpleSiteLink) section and click the Appearance header to expand it. In the CssClass properties, replace the default text, ms-siteicon-a, with logo.
  3. Still in the Customization – Site Logo (SPSimpleSiteLink) section, expand the Navigation section and in the NavigateUrl field, type ~sitecollection/.
  4. In the Customization – Site Logo (SiteLogoImage) section, expand the Appearance section and delete the default text from the CssClass field. Then expand the Misc section, and in the LogoImageUrl field, replace the default URL in the field with /_catalogs/masterpage/trigent/logo.png.
  5. Scroll up and click the Update button, then select and copy the HTML snippet.
  6. Replace the HTML with the Site Logo snippet you just copied
  7. Save Trigent2013.html, return to the master page preview in the browser, and refresh. The site logo should look exactly the same as it did before.

 Step 5: Edit Display Templates

Used for displaying search results and data. The Design Manager provides you with a view into the display templates folder in the Master Page Gallery, so you can see the available templates that can be used as a starting point for creating any custom template you want.

 Step 6: Edit Page Layouts

Page layouts are basically layout templates for displaying content on each page in SharePoint. All publishing pages are based on a page layout, and each page layout is based on a content type.

Creating custom page layouts will be discussed in detail in the next blog.

 Step 7: Publish and Apply Design

Here you will publish your design assets, page layout, and master page. Then you’ll apply the master page to the site.


  • Click the link Go to the Master Page Gallery. The Master Page Gallery opens in a new browser tab.
  • Click the Trigent folder to display its contents and put a check in the box that appears next to the Trigent2013.html file when you hover over the filename.
  • On the ribbon, click the Files tab; then click the Publish button toward the right side.

  • In the dialog that opens, optionally type a comment in the Comments field; then click OK to publish your master page. SharePoint automatically publishes the corresponding Trigent2013.master file.
  • There’s no way to mass publish all the items in this folder from within the Master Page Gallery. We have to take different approach click the Settings menu > Site settings.
  • Under the Site Administration header, click Content and Structure to open the Content and Structure manager.

  • In the left pane of the Content and Structure page, click the + next to Master Page Gallery. Then click the Trigent folder to display its contents in the main window of the page.
  • At the top of the main body, click the icon of stacked check boxes to select all items in the folder.
  • Click the Actions drop-down in the toolbar, and select Publish. In the dialog that appears, optionally type a comment, and then click OK. This publishes all items in the Trigent folder.

  • Select each sub folders in Trigent folder and repeat the publish process for the items in each folder.
  • When everything is published, click the Back to ‘[Site name]’ link in the upper left of the Content and Structure window to return to your site.


  • Return to the Design Manager tab in the browser.
  • Still on step 7, click the link Assign Master Pages to Your Site Based on Device Channels. This opens the Master Page Settings in a dialog.
  • For the Default drop-down, select trigent/trigent2013. Change the System Master Page setting drop-down to trigent/trigent2013. Click OK to apply your custom master page to your site.
  • System master page setting applies the selected master page to all page types, including settings pages.

Step 8: Create Design Package

A design package is a Windows Solution Package (WSP), sometimes called a SharePoint Solution, which contains your custom branding assets from the site and instructions on where those assets should be deployed. When a design is packaged up in a WSP, it can be imported to other SharePoint sites or farms, and the custom branding you’ve built can be applied to other sites.


  1. In the Design Name field, SharePoint has provided a name for you; it uses the site’s name by default. You can change it if you want. This becomes part of the filename for the design package. The other part is the version number of the design that appears directly under the name field.
  2. You have the option to include the site’s search configuration in the design package. This can be useful if you’ve spent some time customizing the search experience in the site with custom query rules, result types, result sources, and other search-related assets.
  3. Click Create to create your design package. You see a message that SharePoint is working on creating the package, and after a few moments, the Design Manager reappears with a link underneath the Create button.
  4. Click the download link Your package is ready save your WSP to your computer for importing into another site. Save your WSP file to a location on your computer, such as your desktop.

5 Ways to Maximize Business Value in Insurance with SharePoint

Today, enterprises have become data-intensive! It is all about controlling expenses, increasing efficiency and above all engaging with customers. The insurance Industry is no exception. To generate a significant business value proposition, improve collaboration among employees and ensuring documentation is properly produced, controlled and audit-able, several insurance companies are harnessing the power of Microsoft SharePoint.

Traditionally, claims and risk management documents were accessed through a hodgepodge of phone calls, e-mails and spreadsheets, making it difficult for the customer to have a unified view of their relationship with an insurer in real time.

In my experience, the primary reason for moving the data from these systems into a portal was two-fold. One was to allow a place for customers to track their transactions and interactions with the insurance company. Secondly, it would allow employees to work with a web-based, user-friendly application that centralized data from disparate (and often not the prettiest looking) enterprise systems internally.

Here are 5 SharePoint capabilities that generate business value in the insurance industry

Improved Records Management:

In this digital age, hard copy documents are still a part of life, especially when you are working with the insurance industry. To have documents 100% digitized is still unrealistic for some insurers. Another challenge faced by many insurers is the shear quantum of information, multiple versions of the same document and the different formats in which information is routinely created.

SharePoint is one of the best tools available to handle all documents – even if they come by email, fax, videos, audio, attachments, others. SharePoint allows you to design effective content structuring & indexing and helps configure easy-to-use records storehouses.

So, not only can SharePoint out-of-the-box fulfill the needs of a complex records management program, we haven’t even scratched the surface of all the other places your organization may be storing data that needs to be governed. This includes email, file shares, Office 365, third-party cloud storage or even physical locations. Having a central file plan that can be applied to all of your records is true records management, or as we at Trigent like to say, complete information governance.

Change Management:

In today’s business, policies and procedures are likely to change more frequently than ever imagined. Whether you are a sales agent, customer service representative or a marketing personnel, it is imperative that you understand the policies and procedures that apply to your business.  While change is unavoidable, as an insurance company you want to have full control around how and when you respond to change.

Change Management around the policies and procedures is a classic example of a perfect use case for SharePoint.  The Enterprise Content Management features in SharePoint is flexible and robust and allows you to control content dissemination. In a more controlled situation, you can use document management capabilities to establish workflows and sanction processes to ensure changes are fully scrutinized and approved before being communicated to employees who are working with customers. In less critical scenarios where change is more frequent and the need for tight controls are not obligatory, a more collaborative approach to information sharing and dissemination with features like wikis, discussions and news-feeds can be applied. SharePoint allows you to manage and control content dissemination via simple to complex workflows that can be customized to meet your business needs.

To successfully develop and deliver your solution, you must put in place the tools and processes and knowledge required to successfully perform change management. Work together. Work faster. Work smarter … ok, that is a Microsoft SharePoint marketing angle as well, but they, all, are equally true.

SharePoint Change Management Benefits:

  • Improved visibility of pending and historical changes
  • Ensure process compliance and accountability with full audit capabilities
  • Enforce estimation, risk management, testing and approval tasks
  • Measure continuous improvement

Process Management:

Just as every company has different approaches to a Change Management process they likely have many different processes. These processes may even differ between parts of the organization. For example, the workflow process to on-board someone in IT will likely be different than the process to on-board a customer service rep or a claims rep. SharePoint has robust workflow capabilities that have been around since 2007 and have gotten better and more flexible with each release.

Adopting a business process management strategy and using BPM tools can help streamline processes, reduce human error, and develop greater integration between systems like SharePoint and the workflows of the people who use them. While SharePoint is not designed to be an enterprise-scale BPM system, this platform can offer some BPM benefits, especially from a workflow management standpoint.

While on-boarding is an obvious workflow scenario that everyone mentions, where I think SharePoint can really shine for the insurance industry/sector is in all the smaller departmental and divisional processes that get overlooked because they aren’t used by the whole enterprise. Workflow in these areas provides value because it can be the tool to create something repeatable out of what is often common knowledge. In many insurance companies that I have worked with in the past, the first part of joining the team entails long orientation and training sessions. Certainly much of this is important training on industry and regulatory information, however, much of it is also trying to disseminate that knowledge on how the departments work. Wouldn’t it be nice if you could build these processes into a system where everyone could follow them more easily?

Savvy managers leverage the amazing out-of-box BPM features of SharePoint to make their lives easier and more efficient. If you’re a staff member struggling with keeping your management informed and in the loop while still getting actual work done, you need to make the case for using SharePoint to make your life much easier.

Another great thing about using SharePoint workflows for process management is that you can invest as little or as much as you feel is needed to support your particular process. You can use many out of the box workflows like approvals, and signatures or you can build your own in a SharePoint Designer. If those don’t fit the need you can go so far as to develop a highly customized workflow using Visual Studio or even other 3rd party tools.

Knowledge Management:

In Insurance, just like any industry, your people and more importantly the knowledge they bring is a critical part of your business. At times, it can be a challenge to know who has what information, especially as a business grows or as employees move from job to job within the organization. With SharePoint you can leverage many capabilities to help provide a place to go for those that have questions.

I have helped many departments both large and small, create knowledge bases with features like Frequently Asked Questions (FAQs), discussions, documentation on processes and so on. Since all this information is also tied into the user answering questions and providing the information, it’s easy to know who is knowledgeable on a particular subject no matter where they are (or who they are) within your organization.

Great Knowledge Management requires a Great User ExperienceThe challenge I often see with knowledge management is getting it off the ground and getting people who are busy with their own work to participate. Many times a reward or recognition system for contributing helps get people to engage and build a community of knowledge that will benefit everyone.

To jump-start Knowledge Management with SharePoint all you need are 3 easy steps:

  • Create, manage and improve your corporate taxonomies as managed metadata in the SharePoint Term Store.
  • Add managed metadata columns to almost any SharePoint list and library. Classify your content by applying your taxonomy terms.
  • Make use of content classification by improved search, filters, navigations, news feeds, content relationship and more.


Really no solution that provides the ability to create and store so much digital content would be worth as much without a very robust search engine. Search in SharePoint is powerful and flexible and can really be tuned and customized to your needs. It has grown and has been improved with each release. I think a scenario is the best way to describe its value.

Imagine you search for the term “marketing manual” and get back a list of 5000 items. That’s probably more items than you were prepared for, but you know it’s a document, so you apply a filter to get just documents and maybe another because you know the manual was just updated last week. Suddenly you are down to a much more manageable list of items. Items that you can mouse over and get a preview of the contents and the author.

The scenario above is really just the “out of the box” scenario, the great thing about SharePoint is the ability to “truly” customize search. You can change how results and refiners/ filters are shown, change how things are previewed and add previews for other types of files. Of course, you can also configure search to find content that is not even in SharePoint with the ability to show results across many line of business systems all in a single place.

I have summarized my many years of experience, consulting and building SharePoint solutions in the insurance industry and is really just the tip of the iceberg for the many uses for SharePoint.

Trigent has broad experience and competences in the insurance industry; we deliver services and SharePoint solutions that integrate sales, marketing, customer service and other processes, enabling insurers to optimize their business, streamline processes and deliver best products and services across various channels to reach the digitized generation while keeping costs under control.

One of our passions at Trigent is being able to listen to customers, take their needs, and map them to the right SharePoint features. We would love to hear from you and help you make the most of your investment in SharePoint.

NOTE: This article has been published on LinkedIn Pulse: https://www.linkedin.com/pulse/5-ways-maximize-business-value-insurance-sharepoint-abishek-bhat

Hybrid in SharePoint 2016

Most of us who work on Microsoft SharePoint can safely agree that Microsoft is pushing its customer base towards SharePoint online. However, the fact is,  as long as the demand for on-premise version of SharePoint continues to exist, it is likely that they will  not stop the release of the on-premise version. For most companies using on-premise SharePoint, the major focus is to work with content management features with Office 365 capabilities.

Microsoft’s vision for cloud inspired experiences for SharePoint is to extend capabilities of its on-premise and online into a connected hybrid experience.  Office 365 provides features that are beyond SharePoint’s storage facilities. Sync with One-drive for business to email storage, it gives ready-to-use user experiences. So, it is becoming inevitable to have a version which will have both the features and capabilities of SharePoint and Office 365.

What exactly is `Hybrid’?

To put it in simple words, a hybrid SharePoint environment is integration between the on-premise SharePoint server and the Office 365 environment. This will help companies to take their first step forward to experience cloud-based functionalities. A hybrid environment will help users to get started on a cloud environment  and connect to their respective content/resources whenever the same is required. This will enable users to have a more seamless user experience in terms of the two environments. The end user is not really bothered where his contents reside in SharePoint as long as it is safe and cannot be  tampered with. With this hybrid feature, search results can be consolidated between SharePoint and Office 365.

Overview of Hybrid Integration

  • Search Feature – Once the Hybrid Search is configured in the SharePoint environment, the search results from SharePoint on-premise and Office 365 will be combined and shown. Searching documents across both the platforms will be easier and quicker compared to earlier SharePoint version where this option was not available. Hybrid Search can be configured to have SharePoint online users to query and search the contents present in the SharePoint server. In the same way, SharePoint on-premise users can search and query their content, present on Sharepoint online and also search and query in Office 365 and SharePoint on-premise.
  • App Launchers – The App launcher feature that was in SharePoint online and Office 365 has been introduced in SharePoint on-Premise to enable users to have a seamless user experience when moving from one version to another. Once this feature is enabled, users can easily view the Office 365 apps such as Delve, video apps and so on in the SharePoint server app launcher. The Hybrid app launcher will have the same look and feel and reduce users to either bookmark or search for the links to navigation from SharePoint to Office 365 apps.
  • User Profiles – User profile information will be stored in both SharePoint server and Office 365. When a user wants to edit or view his information that user will be redirected to his profile in Office 365. This will enable users to have to his information in one place. These users will be called Hybrid users and their profiles as Hybrid profiles.
  •  Following Sites – Following sites and pages in the SharePoint server and online version have been consolidated and will be displayed in the same place. This will help uses to navigate to sites that are followed on both versions with ease.
  • OneDrive – Links to OneDrive have been provided to enable users to see the contents of the drive folder and share their contents present in OneDrive for Business in SharePoint server.

SharePoint Online and Salesforce Integration

SharePoint Online and Salesforce are two different cloud platforms, provided as “Software as a Service” from two different vendors.

SharePoint is a cloud-based “Software as a Service” using which organizations can share content with colleagues, partners, and customers. SharePoint online also provides flexibility to access it from anywhere, i.e. home or office or wherever Internet connectivity is available, and from any device, i.e. mobile/compact.

At the other end of the spectrum,  Salesforce is a cloud-based customer relationship management software solution for sales, service, marketing, collaboration, analytics, and building reports.

Both the above can be considered as “Software as a Service” platforms.

In most business situations, there may be a use case, where business users would like to seamlessly obtain data from Salesforce on to SharePoint online, so that, the information can be collaborated from one single platform, instead of two different places.

In this blog, I will explain the concept and steps required to integrate Salesforce with the SharePoint Online site, so that, information updated or created in Salesforce will, in real-time, be updated and created in SharePoint online site.

When the question arises as to how to write data in SharePoint online, the first hurdle is to remotely authenticate the user against it, and in order to remotely authenticate the user, the best way available is REST api.

You need to make few rest calls to get the authentication piece as given below:

  • Get the security token
  • Get the access token
  • Get the request digest

The above rest call should be translated into an apex class which is supported by force.com

The first task is to get the SharePoint online security token, which can be obtained by posting XML as the request body to https://login.microsoftonline.com/extSTS.srf. In the XML you need to pass on account credentials which has at least contribute access.

The above request would fetch a response security token which is needed to get the access token.

In order to get the access token, again a rest call is required to be posted to the following URL with the security token as the request body:


The rest call with the request body including security token to the above URL would fetch a response, which would contain cookies and these cookies must be included in all the subsequent rest calls.

After the above operation, you need to have the request digest. The request digest is obtained by posting the rest call along with the access token and the obtained cookies to the following URL:


The rest call that is posted to the above URL will fetch the response along with the request digest. Please note that the entire contents of the “FormDigestValue” tag would be required which includes the date-time portion as well as time zone offset.

All the above steps have to be carried out in terms of a global apex class, and call the apex class with the trigger in salesforce.

Apex class source code is as given below: 

global class SharePointOnlineWebserviceCallout{
 @future (callout=true)
 Public static Void GetAuthentication(string AccountTitle)
 string body = '';
 string formattedCookie = '';
 string output = '';
 string cookie = '';
 string token = '';
 string username = 'account@sharepoint.com';
 string password = 'Password';
 string host = 'https://yourdoamin.sharepointonline.com';
 string tokenRequestXml ='<s:Envelope ' +
 'xmlns:s='http://www.w3.org/2003/05/soap-envelope' ' +
 'xmlns:a='http://www.w3.org/2005/08/addressing' ' +
 'xmlns:u='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'> ' +
 '<s:Header>' +
 '<a:Action s_mustUnderstand='1'>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:Action>' +
 '<a:ReplyTo> ' +
 '<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address> ' +
 '</a:ReplyTo>' +
 '<a:To s_mustUnderstand='1'>https://login.microsoftonline.com/extSTS.srf</a:To> ' +
 '<o:Security ' +
 's:mustUnderstand='1' ' +
 'xmlns:o='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'> ' +
 '<o:UsernameToken> ' +
 '<o:Username>' + username + '</o:Username>' +
 '<o:Password>' + password + '</o:Password>' +
 '</o:UsernameToken>' +
 '</o:Security>' +
 '</s:Header>' +
 '<s:Body>' +
 '<t:RequestSecurityToken xmlns_t='http://schemas.xmlsoap.org/ws/2005/02/trust'> ' +
 '<wsp:AppliesTo xmlns_wsp='http://schemas.xmlsoap.org/ws/2004/09/policy'> ' +
 '<a:EndpointReference> ' +
 ' <a:Address>' + host + '</a:Address> ' +
 '</a:EndpointReference> ' +
 '</wsp:AppliesTo> ' +
 ' <t:KeyType>http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey</t:KeyType> ' +
 '<t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType> ' +
 ' <t:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</t:TokenType> ' +
 '</t:RequestSecurityToken> ' +
 ' </s:Body> ' +

HttpRequest reqBinaryToken = new HttpRequest();

HttpResponse responseBinaryToken = new HttpResponse();
Http httpBinaryToken = new Http();
responseBinaryToken = httpBinaryToken.send(reqBinaryToken);
string xmlContent = responseBinaryToken.getBody();
Dom.Document doc = responseBinaryToken.getBodyDocument();
Dom.XMLNode address = doc.getRootElement();
//XmlStreamReader reader = new XmlStreamReader(responseBinaryToken.getBody());
string outxmlstring = String.valueof(doc.getRootElement().getName());//gives you root element Name

XmlStreamReader reader = new XmlStreamReader(responseBinaryToken.getBody());
while(reader.hasNext()) {
if (reader.getEventType() == XmlTag.START_ELEMENT && reader.getLocalName()== ‘BinarySecurityToken’) {
if(reader.getEventType() == XmlTag.CHARACTERS){
token = reader.getText();
token += ‘&p=’;

HttpRequest requestCookie = new HttpRequest();
requestCookie.setHeader(‘Content-Type’, ‘application/x-www-form-urlencoded’);
requestCookie.setHeader(‘User-Agent’,’Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)’);

HttpResponse responseCookie = new HttpResponse();
Http httpCookie = new Http();
responseCookie = httpCookie.send(requestCookie);
string location = responseCookie.getHeader(‘Location’);

if(responseCookie.getStatus() == ‘MovedPermanently’){
HttpRequest reqMovedPermanently = new HttpRequest();
reqMovedPermanently.setHeader(‘Content-Type’, ‘application/x-www-form-urlencoded’);
reqMovedPermanently.setHeader(‘Location’, location);
reqMovedPermanently.setHeader(‘User-Agent’,’Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)’);
HttpResponse responseMovedPermanently = new HttpResponse();
Http httpMovedPermanently = new Http();
responseMovedPermanently = httpMovedPermanently.send(reqMovedPermanently);
cookie = responseMovedPermanently.getHeader(‘Set-Cookie’);
cookie = responseCookie.getHeader(‘Set-Cookie’);

HttpRequest requestDigest = new HttpRequest();

Http httpRequestDigest = new Http();
HttpResponse responseRequestDigest = new HttpResponse();
responseRequestDigest = httpRequestDigest.send(requestDigest);
string requestDigestValue = responseRequestDigest.toString();
string xmlContentRequestDigest = responseRequestDigest.getBody();

Integer index1 = xmlContentRequestDigest.indexOf(‘”FormDigestValue”:”‘);

Integer index2 = ‘”FormDigestValue”:”‘.length();

string contentRequestDigest = xmlContentRequestDigest.Substring(index1 + index2);

string requestDigestXml = contentRequestDigest.split(‘”‘)[0];

HttpRequest reqWrite = new HttpRequest();
HttpResponse resWrite = new HttpResponse();
Http httpWrite = new Http();

Partner with us to ensure seamless collaboration and communication across the enterprise with SharePoint.

OneDrive for Business

Microsoft has a public offering called OneDrive. It is a personal online storage service, easily comparable to one you may already know, i.e. Dropbox. You can store files/documents in your OneDrive and access them from anywhere, or you can even send links to people so they can see it, based on the permissions provided. This service is often included if you have an Outlook.com account, or even a Windows Phone – phone pictures and large email attachments and will automatically be uploaded to your personal online storage, OneDrive.

The concept of OneDrive is simple: upload your files/documents, and access them from anywhere. You have 7GB or more of personal storage, depending on factors such as if you have a Windows Phone associated to your account, or if you spend more to get more. It is all about  making simple collaboration achievable.

A Short History Lesson on OneDrive for Business

OneDrive for Business is nothing more than the evolution of a tool named Groove, first seen with Office 2007. The actual idea behind the very unsuccessful Groove tool was to collaborate, and work, on files with our team members, without necessarily having a server. The key feature was synchronizing the files offline on other devices such as the home computer, to continue working with team members. We could say it was Share Point for the very small business, without the server and the nice features. However, it just never took off.

SharePoint Workspace

SharePoint Workspace was the new name it was given with the Office 2010 and with it Groove became a SharePoint tool that allowed end-users to synchronize both libraries and lists, offline. It was to help companies using the now very popular SharePoint platform with people on the road or without having Internet connections to still access important documents. SharePoint Workspace wasn’t bad, though it had so many limitations when you started using it. It just didn’t meet the success Microsoft was hoping. Of course, by this time, Dropbox was becoming a popular service to store documents online, synchronize those documents offline seamlessly on our computer and share using links. Where SharePoint was the big solution platform, the rise of the cloud technology and subscription based offerings started to hurt Microsoft as not everyone always required the big SharePoint platform.

When SharePoint 2013 was released, with it a new version of Groove and SharePoint Workspace, it was called as SkyDrive Pro. It created a lot of confusion since Microsoft had invested a lot in the marketing of SkyDrive, a public offering to compete with the services like Dropbox. But once again, all it did was synchronize SharePoint document Libraries offline through a desktop installation that came with Office 2013.

Microsoft had to rename service from SkyDrive Pro to OneDrive for Business…

OneDrive for Business is first a synchronization tool

The brand for the service of OneDrive for Business does and enables a lot more. However, at the core, it was just a synchronize tool. Either by installing Office 2013 on your computer or through a standalone installer, you would install OneDrive for Business.

Once installed on your system, whenever you click on the button to Sync on a document library, it then launches the tool installed and starts synchronizing.

Technically, this is how OneDrive for Business works. It’s a tool that evolved from Groove and allows you to synchronize offline files/documents you need to work with.

Synchronizing the main OneDrive for Business Library:

Synchronizing any SharePoint Document Library:

However, the evolution of the SharePoint product and the continuing efforts made by Microsoft to compete on the cloud market, OneDrive for Business is becoming a whole lot more.

A new name for SharePoint MySites

For those of us that came from the SharePoint, we saw another feature called “My Sites” but not quite successful. The idea that every SharePoint user has her/his personal(MySite) site to store documents/files, something I often saw as a replacement to the popular “My Documents” for the new-age Web.

From SharePoint 2013, they changed the name My Site for this feature and branded it with the name of the synchronization tool itself, OneDrive for Business. It is now, in the Suite Bar at the top, i.e. where we used to have My Site, we now have OneDrive.

In SharePoint, this can hold up to 30,000,000 documents. It’s important I start with that because I often get questions or comments on how little the limit of 20,000 documents/files is for OneDrive for Business. 20,000 is the number of documents from “My Site” or OneDrive for Business document library you are able to synchronize offline. I don’t see any good reason to synchronize more than that on your computer from the 30 million documents/files you can have. This doesn’t stop you either from creating regular Document Libraries and using OneDrive for Business to synchronize offline, though they will have a 5,000 documents sync limit.

Synchronization limits and document limits are both different.

OneDrive for Business and SharePoint Online

To make it clear again, I do not believe SharePoint technology is going away, not even for a second. But the competition out there for Microsoft is fierce. A great strategy for them(Microsoft) is to have people using the OneDrive as the public offering at home or as a student to look for the next level of features for doing work. A great way to do that is to advertise SharePoint Online as a business version of the public offering. Today, your business or team can even subscribe to OneDrive for Business as a standalone subscription.
OneDrive for Business grow into collaboration and sharing of documents. SharePoint is this great platform that enables us to do so much based on our business needs and technically OneDrive for Business is just a sync tool.

SharePoint’s ‘Crawled’ and ‘Managed Properties’ for Search

This is how Sharepoint can maximize business value.

When we start learning SharePoint, we focus more on columns and site columns. However, in SharePoint 2013, the major feature that everyone talks about is the `search’ feature and what can be done with it.

To do anything with search-related features, we first need to understand the difference between crawled’ and `Managed Properties’.

The Basics of SharePoint Search

One of the biggest issues with SharePoint is how SMB’s know about search and the time and effort that needs to go into it. It requires many changes starting with its configuration and moving on from there to topology, content sources, and crawl schedules.

Pretend for a second that the building where you work is your SharePoint farm. It is brand new and completely empty. The rooms represent your SharePoint sites. To be able to ask the search engine what you have in each of these rooms, you will first need it to run around the entire building and take notes of everything. This is what we call crawling. How often the crawling happens will determine the search result “freshness” amongst other settings like the crawl type.

Everybody assumes that the columns created by them in their lists and libraries are now searchable. However, most often this is not the case.

SharePoint Search Crawled Properties

A crawled property is content and metadata that is extracted from an item, such as a document or a URL, during a crawl. A crawled property can be an author, title, or subject. This means that it has passed over our columns and the metadata assigned to each element. We do not have any control over the creation of “Crawled Properties”. These are the list of results of columns crawled in some way, though we are over-simplifying it.

A crawled property by itself is not useful when we try to build or run search queries or even display the value of this property in search results. Picture the crawled properties more as the information collected by that crawl that has been going around our building in our previous example. The crawl goes through our sites, lists, and libraries to find our content and picks up the value in our columns, and stores them as crawled properties.

SharePoint Search Managed Properties

The Managed Properties is where it all happens. If we need anything to be search-related: Search Results, Refiners, Display Templates, Content Search, etc., then we will need to understand how to create and manage these “Managed Properties”.

Each Managed Property is by default mapped to one or multiple “Crawled Properties”. Assume that our organization has many lists and libraries. In them, users (logged in Users) created columns like “Customer Name” and “Client”.

For the organization, the columns “Customer Name” and “Client” represent exactly the same content, but not for search. For search, they are just crawled properties and both very different ones at that, because they do not share the same name. Since they are only Crawled Properties, if someone searches for all documents where Client=Trigent then the result will be nothing at all. Because no search-related feature works with crawled properties, we need to create a Managed Property called “Customer” and assign both crawled properties to it.

In some scenarios though, we may find that a Managed Property has already been created for our Crawled Property, automatically. That’s because as always, there are exceptions. If we create a Site Column and assign it to a list or library, when the indexer crawls, it will automatically create a Managed Property for it. Regardless of it being a site column or not, Managed Metadata columns will always have Managed Properties created for them.

Where do I create and manage these Properties?

Now we understand the difference between the two at a high level, we will need to know how to see the crawled properties collected and created by our search engine as well as the existing managed properties. Luckily for us, in SharePoint 2013 we no longer have to go in the Central Administration of SharePoint or Office 365 to create them. It is still what I would prefer as these will be global and centralized for all web applications associated to this search service application. It’s not unlikely for specific Site Collections to need their own Managed Properties and isolate them there.

To navigate, create or edit these properties, we simply need to find the Search Schema either in the Central Administration for the search service application or from site settings of a site or site collection.

How to create a Managed Property for columns, which are created in the library/list:

  • Open central administration in SharePoint 2013 On-Premise environment.
  • Application Management –> Manage Service Applications (under Service Applications).

  • Click Search Service Application, created in the current environment.

  • Click Search Schema in the left navigation

  • Click New Managed Property as shown below

  • Provide the value for the Property Name, description, select type.
  • Check, if the managed property needs to be Searchable, Retrievable ,Queryable and if it needs to store the multiple values.

  • Click Add a mapping button.

  • Search for the mapped property, add it to the Managed property. Mapped property will be created for all the columns with ows_ as prefix

  • Click OK button. Now, the managed property will be created.

SharePoint can crawl data from different sources. The data in various source system have metadata which can have a different name but it refers to the same information. As an example different systems can store the information about the Author in various systems with the name as Author,CreatedBy, Writer, Owner, and in case of emails it stored in the field. But all these fileds represent same information which represent who has created this.

Now SharePoint crawl these various system all these properties become Crawled properties. In SharePoint we can group all these crawled properties under one Managed property.

The problem with optimistic title override and the title managed property

The problem we’ve been experiencing with SharePoint Search is it’s over willingness to help improve search results. We see, there is an integrated feature built in search that will extract what it thinks is the Title of our document and show that in the Search results, regardless of the value we entered in the Title column. The search engine will take, for example, our headings in a Word document or the first slide with larger text in PowerPoint and override any other title we may have specified. This was very unpleasant as we can imagine, many documents would often have the same heading as they were the result of a filled out form. As a result, SharePoint would hide our documents in search results calling them duplicates.

In SharePoint 2013, with the October 2013 CU or SP1 installed on server, we will now be able to see this special “Crawled Property” in our Title Managed Property.

SharePoint Search Results and other search related features can only show and work with managed properties. If the Title is being displayed  as the wrong one, then we need to check and verify the Managed Property responsible for it and see what crawled properties are assigned to it and in what priority of order. Before, we could not see this special crawled property that had the highest priority and in turn could not adjust it.

Talk to our Sharepoint experts to custom build solutions that meet your business requirements.

AngularJS with SharePoint

In the recent past, web apps have taken on an extremely important role with a prerequisite that they be fast and appealing. More importantly they need to be user friendly. While there are several good technologies to create such apps, I believe that there is one good technology AngularJs, which is extremely useful for creating the structural framework for dynamic web apps. From the client side, AngularJs helps make web apps faster and provides the support required for best user interface. It can be used with any technology including MVC and MVVM frameworks.

Why AngularJs?

We can develop any web application with DOM Manipulation, Data binding etc. However, AngularJS makes this easier. Some key advantages of AngularJs are:

  1. AngularJs supports cross-browser JavaScript code in applications
  2. It is a rich internet application
  3. It is Open Source technology
  4. It has awesome flexibility and makes it easy for developers to code
  5. Increases the business for apps and works with cross technologies.
  6. MVW Framework(Model View What Ever)
  7. Bootstrap

How AngularJS works

Integrating Angular with SharePoint:

SharePoint has the ability to use client-object-model JavaScript and Rest API to create web parts. The advantage of this is, we can use it in .Net, Silver Light etc in JavaScript libraries. Although, SharePoint has server-side code with which we can accomplish a lot of things, there is the off chance that we may not be able to achieve rich user interface and performance – although for this, we could use JQuery or other similar frameworks. When comparing these frameworks, AngularJS is the best way to modify Document-Object-Model (DOM).

Before integrating SharePoint we should know a few things about Angular:

  • Controller – JavaScript functions that are bound to a particular scope.
  • Scope – Objects that refer to the model. They act as a glue between controller and view.
  • Directives – Markers on DOM elements, these can be used to create custom HTML tags that serve as new, custom widgets. AngularJS has built-in directives (ngBind, ngModel, ngBind, etc.)
  • Data-binding – It is the automatic synchronization of data between model and view components.
  • Factory– Factory come with several built-in services for example $http to make an XMLHttpRequests.


A Controller is a JavaScript object which contains attributes and functions. A Controller is defined using the AngularJS built-in directive ng-controller. A Controller handles all the operations related to a view to which it has been associated.

A Controller is defined as follows:

angular.module(rootApp, []).controller(home.controller, function($scope) {

And the above controller can be declared as follows:

<div id="myDiv" ng-app="rootApp" ng-controller="home.controller">

Built-in Directives

As the name itself indicates, Directive is an indicator to the angular compiler. It directs the angular compiler that what to do when it comes across a Directive. AngularJS provides such built-in directives to ease the developer work. Some of the important directives necessary to build an AngularJS app are-

  • ng-app – This directive defines and links an AngularJS application to HTML.
  • ng-controller – This directive associates a controller to a view.
  • ng-model – This directive binds the values of AngularJS application data to HTML input controls.
  • ng-bind – This directive binds the AngularJS Application data to HTML tags.
  • ng-repeat – This directive is used to iterate through a list and generate elements dynamically.

There are many other built-in directives which you can refer from the AngularJS documentation as and how you come across different requirements.

Custom Directives

Custom directives are used to extend the HTML functionality. Custom directives are defined using the “directive” function. A custom directive replaces an element to which it has been applied. Let’s understand this with an example.

I want to define a custom tag as follows, which has an attribute called “title”.

&lt;announcements title=""&gt;&lt;/announcements &gt;

To handle above custom tag a custom directive has to be written

var app = angular.module(‘rootApp’, []);
 app.directive(‘announcements’, function() {
 var directive = {};
 directive.template = "Title: <b>{{ title}}</b> “;
 directive.scope = {
 title: "=title"
 directive.compile = function(element, attributes) {
 element.css("background", "blue");
 return directive;


It is JavaScript object and it contains the properties and functions although it will interact the controller and view.

$scope.getUser() {
 $scope.User = userInfo;


This is a simple function. Add some logic and it will return the object. And we can call in controller,service,directive, etc. Create common or helper function in factory to refer in app.

angular.module(rootApp, []).controller(home.factory, function($scope, $http) {
 Var homefactory = {};
 homefactory.getAnnouncements = function() {
 return homefactory;

Create sample in SharePoint with Angular.

  1. Download the angular.min.js
  2. The following folder structure need to be create to step Angular with SharePoint.
    a) Map folder site assets module in visual studio.
    b) Inside site assets need to following structure.
  3. Create home.factory.js inside the factory – Home and add the below code.
    angular.module('home.factories', [])
     .factory('HomeFactory', ['$q', '$http', function($q, $http, ) {
     var homefactory = {};
     var date = new Date();
     var urlHomeSiteCollection = ""; //pass the url here.

    homefactory.getAnnouncements = function() {
    var currentDate = date.getFullYear() + “-” + (date.getMonth() + 1) + “-” + date.getDate();
    var queryUrl = urlHomeSiteCollection + “/_api/web/lists/GetByTitle(‘Announcements’)/items?$Select=Title,Body,Expires,CategoryLookup/Title,CategoryLookup/BackgroundColor,CategoryLookup/TextColor,CategoryLookup/CategoryIcon&$expand=CategoryLookup&$filter=Expires ge datetime'” + currentDate + “T00:00:00’&$orderby=Expires+asc,Modified+desc&$top=10”;
    return $http.get(queryUrl);
    return homefactory;

  4. Create home.controller.js inside the controllers- Home and add the below code.
    angular.module('home', [home.controllers ','
     home.factories ']);
     angular.module("home.controllers", ['home.factories']).controller('HomeController', function($scope, HomeFactory) {
     $scope.Announcements = [];

    function initHome() {
    // load announcements and binding
    function loadAnnouncements() {
    HomeFactory.getAnnouncements().then(function(result) {
    if (result.data.d.results && result.data.d.results.length > 0) {
    }, function(error) {
    console.log(“Error fetching announcements. ” + error.data);

    function bindAnnouncements(results) {
    if (results.length > 0) {
    $.each(results, function(key, value) {
    var announcement = {
    Title: value.Title,
    Description: Description

  5. Add the below code in rootapp.js. The rootapp.js for inject multiple controllers and make a one app to refer in application.
    var rootApp = angular.module('rootApp', ['home'], function() {});
     angular.module("home", [], function() {});
     angular.module('home').run(function($http) {
     $http.defaults.headers.common["Accept"] = "application/json;odata=verbose";
    Note: if want to refer multiple controllers in page we have to follow as shown as above code.
  6. Add downloaded angular js, jquery inside the lib – Framework folder
  7. Add custom CSS inside the lib – css folder.
  8. Refer angular.js, jquery and rootapp.js sharepoint master page.
  9. Applications that have any CSS, JavaScript function related to the header, footer or any load function should be added to the app.js and refer to the SharePoint master page.
  10. Create the application page and the below scripts and html code.
    <script type="text/javascript" src="/SiteAssets/Content/app/controllers/Home/home.controller.js"></script>
     <script type="text/javascript" src="/SiteAssets/Content/app//factory/Home/home.factory.js"></script>
     <div id="hero-background-image" ng-controller="HomeController">
     <div class="item" ng-repeat="announce in Announcements">
     <div class="carousel-caption">
     <div class="row">
     <div class="col-sm-4 col-md-2 announcement-category">{{announce.Title}}</div>
     <div class="col-sm-8 col-md-10 announcement-body">{{announce.Description}}</div>
  11. Deploy the application.

Happy Coding!

Exit mobile version