Subscribe: Rajendra Shekhawat's Blog
Preview: Rajendra Shekhawat's Blog

Rajendra Shekhawat's Blog

Through this blog, it is my effort to share experiences with the community and make the journey enjoyable.

Last Build Date: Mon, 13 Nov 2017 22:47:39 +0000


Multi-factor Authentication (MFA) with CSOM

Mon, 13 Nov 2017 22:46:00 +0000

OfficeDevPnP.Core.AuthenticationManager is part of the PnP Core Library available here:

var authManager = new AuthenticationManager();
var ctx = authManager.GetWebLoginClientContext("");
Web web = ctx.Web;
User user = web.CurrentUser;

C# 6.0 New Features

Sat, 18 Feb 2017 13:30:00 +0000

C# 6.0 New Features -Auto Property InitializerPrimary ConsturctorsDictionary InitializerDeclaration ExpressionsStatic Usingawait inside catch blockException FiltersConditional Access Operator to check NULL ValuesReferences -[...]

SharePoint Framework - App File (.sppkg) Upload not working

Wed, 15 Feb 2017 12:01:00 +0000

Issue - On upload of app (.sppkg) file, App package not getting valid. On uploading, it is expected to SharePoint will display a dialog and ask you to trust the client-side solution to deploy.
However, popup is not coming. Also, Product ID is also blank

Reason - Your Tenant is not a Developer Tenant. SharePoint Framework is not available in production environment, so the only way you have to test it, is using a dev tenant. 

Resolution -

  1. Follow the steps to create a new Office 365 Developer Tenant -

  1. Convert existing tenant to Developer Tenant -  Make sure you have First Release options enabled.

After updating First Release settings, it may take a while to update the settings. Once updated, your tenancy would have SharePoint Framework Release enabled and App Packages will function as required.

SharePoint Framework Yeoman template broken by TypeScript 2.1 definition

Wed, 15 Feb 2017 04:39:00 +0000

Building SharePoint Framework new project using gulp serve, gives errors for TypeScript building the project.

Issue - SPFx broken by Typescript 2.1 extensions
Resolution - npm install @types/lodash@4.14.50

SharePoint Framework - Starting a new project

Wed, 15 Feb 2017 03:52:00 +0000

  1. Setup your development environment based on the steps defined at

  1. At command prompt use following command - 

yo @microsoft/sharepoint

  1. Install the developer certificate for use with SPFx development, switch to your console, make sure you are still in your project directory and enter the following command:

gulp trust-dev-cert

  1. Enter the following command in the console to build and preview your web part:

gulp serve

Ionic 2 - Visual Code - Extensions

Sat, 11 Feb 2017 03:35:00 +0000

When beginning development with Ionic in Visual Code, following extensions would save lot of effort and time -

Ionic2 - New Project - Error - no such file or directory, open '..\index.html'

Sat, 11 Feb 2017 03:23:00 +0000

After creating a new ionic 2 project, serving project for first time, gives error  Error - no such file or directory, open '..\index.html'Resolution - - CLI version should be 2.1.0 not beta. If you run ionic -v and have anything other than 2.1.0, run:npm uninstall -g ionicnpm install -g ionic[...]

Visual Studio Ionic 2 - Error (DEP10402) : Could not locate the start page. You may need to build your project.

Fri, 10 Feb 2017 19:35:00 +0000

On creating new Ionic 2 project templates with Visual Studio 2015, build is failing with the Error  (DEP10402) : Could not locate the start page. You may need to build your project.Reason - There is no files in www folder by the build.Resolution -Update your ionic app scripts to the latest version. It is 1.0.0 for RC5 release.npm install @ionic/app-scripts@latest --save-devUpdate your package.json to match the following dependencies, remove existing node_modules directory, and then run npm install:"dependencies": { "@angular/common": "2.2.1", "@angular/compiler": "2.2.1", "@angular/compiler-cli": "2.2.1", "@angular/core": "2.2.1", "@angular/forms": "2.2.1", "@angular/http": "2.2.1", "@angular/platform-browser": "2.2.1", "@angular/platform-browser-dynamic": "2.2.1", "@angular/platform-server": "2.2.1", "@ionic/storage": "1.1.7", "ionic-angular": "2.0.0-rc.5", "ionic-native": "2.2.11", "ionicons": "3.0.0", "rxjs": "5.0.0-beta.12", "zone": "0.6.26", "sw-toolbox": "3.4.0" }, "devDependencies": { "@ionic/app-scripts": "1.0.0", "typescript": "2.0.9" }[...]

Wed, 18 Nov 2015 05:36:00 +0000

Multi Tenancy Identifier for Office 365

When creating Multi Tenancy environment, there is always a identify the Tenant Id, so that corresponding data could be stored and fetched from Datasource.

In TokenHelper.cs there is a public method GetRealmFromTargetUrl(Uri targetApplicationUri) that takes URI of the target sharepoint site as its parameter. This method actually return a string representation of the realm GUID

Realm is unique to each tenant in Office 365 or to each SharePoint farm on-premises. It is possible to discover the realm at run time. So, it is not necessary to cache this information between requests, but it will cost you an extra round trip to SharePoint each time you want to look it up. If you use code similar toTokenHelper.GetRealmFromTargetUrl with the site URL, and cache the result per site (or even per site and per user), you can use this later without making the extra call.

var tenantAdminUri = new Uri(String.Format("https://{0}", tenantStr));

string realm = TokenHelper.GetRealmFromTargetUrl(tenantAdminUri);

You can use Guid now to identify the Tenant.

SharePoint 2013 People Picker Set Value on Form Load

Mon, 09 Dec 2013 09:26:00 +0000

SharePoint 2013 provides client side people picker.
Following snippet helps to set the form value using JQuery and validate the user.

Below JQuery script sets the people picker value, disables the control and sets the background color.

Hope it helps.

- Add Custom Control to the rendering template

Good to go ......

SPD Custom Activity - Copy List Item between Folders

Mon, 05 Nov 2012 12:59:00 +0000

SPD 2010 Limitation - SharePoint Designer 2010 does not give option to copy documents between folders in the same document library. Hence, required for custom activity.

Installation -

- Install Custom WSP (SPSPassionSPDActivities.wsp)
- Activate Webapplication Feature - Title - 'SPSPassion SPD Activities Deployment'


Usage -
- In SPD Workflow, add action from 'Custom Actions' category - 'Copy List Item between Folders'
- Configure
○ 'this item' in action
○ 'to Folder' - Set it to Folder in the document library set in 1st Parameter.

Custom Action WSP Download

SharePoint 2013 BCS Error

Thu, 01 Nov 2012 22:36:00 +0000

' The load balancer is not provisioned. Verify the load balancer was provisioned successfully before retrieving endpoint addresses'.  
On first time using SharePoint 2013 BCS Service Application, it gives the error - ' The load balancer is not provisioned. Verify the load balancer was provisioned successfully before retrieving endpoint addresses'.

It has NOTHING to do with WCF services as this was in an RTM environment.
 Recreate the service application and works fine.


Presenting at SharePoint Saturday India - 20th November 2010

Fri, 19 Nov 2010 09:24:00 +0000

SharePoint Saturday India is back. This online event is going to happen on November 20th, 2010. Alpesh did a great job at getting several speakers for this event and there are going to be some parallel sessions happening this time.

I will be speaking about "Introducing Duet Enterprise for Microsoft SharePoint and SAP Applications". This is a level 200 session and would introduce Duet Enterprise. I am excited and a bit nervous too.

You can check the complete list of speakers here @
You can register for this event @

SharePoint Saturday India Registration Open

Mon, 22 Feb 2010 12:30:00 +0000

Join SharePoint architects, developers, and other professionals from India that work with Microsoft Office SharePoint Server 2010 and 2007 for ‘SharePoint Saturday’, on Saturday, April 24th, 2009 for the online event. SharePoint Saturday will be an educational, informative & lively day filled with sessions from respected SharePoint professionals & MVPs, covering a wide variety of SharePoint-orientated topics. SharePoint Saturday is FREE, open to the public and is your local chance to immerse yourself in SharePoint!

We are happy to announce that registration is now open.
So don't delay and register today at

Also, follow us on twitter at @spsindia for more information on the event, with respect to sessions and events.

Cheers ....

SharePoint 2010 - SharePoint Designer settings

Thu, 14 Jan 2010 13:01:00 +0000

Microsoft Office SharePoint Designer is a free WYSIWYG HTML editor and web design program from Microsoft for SharePoint and other websites and is part of the SharePoint family of products. It is part of the Microsoft Office 2007 & 2010 family.In SharePoint 2010, administrators would be able to control usage of SharePoint Designer in their environment. Now several administration controls and commands help channel SharePoint Designer into the right hands and onto the right pages. There are following settings available for SharePoint Designer administrator :De-activate SharePoint Designer entirely (but only if it's absolutely necessary!)Disable unghosting of web pages Turn off master page editing Lock the URL of a web site These settings are available at following places -Central Administration : 'General Application Settings' group ( below snapshot ) On clicking of 'Configure SharePoint Designer Settings' link, product displays the SharePoint Designer settings at webapplication level. ( Below Snapshot ). At webapplication level, all the settings are enabled. Farm Administrators can change their settings at the webapplication level. If SharePoint Designer is disabled at the webapplication level, it also disables the usage at all the containing sitecollections. 2. In Site Settings page in Site Collection : Under 'Site Collection Administration' group. On clicking of 'SharePoint Designer Settings' link, product displays the SharePoint Designer settings at sitecollection level. ( Below Snapshot ).SharePoint Designer Groups - Furthermore, a new permission group, called Designer, helps target those users who really need SharePoint Designer. [...]

SharePoint 2010 Management Shell - Features CmdLets

Wed, 13 Jan 2010 10:26:00 +0000

The SharePoint Management Shell in SharePoint Foundation 2010 provides an extensive set of Windows PowerShell cmdlets that make development, deployment, and administration of SharePoint 2010 easier and more efficient. Management Shell contains the Powershell cmdlets for SharePoint, by using this we control and manage the SharePoint operations like we done in STSADM command.Powershell cmdlets for managing SharePoint Features - PS C:\Users\Administrator> get-command *feature* CommandType Name Defintion ----------- -------- ------------------------------------ Cmdlet Disable-SPFeature Disable-SPFeature [-Identity...Cmdlet Enable-SPFeature Enable-SPFeature [-Identity]...Cmdlet Get-SPFeature Get-SPFeature [[-Identity] <...Cmdlet Install-SPFeature Install-SPFeature [-Path] get-help get-spfeatureNAMEGet-SPFeature SYNOPSISReturns the SharePoint Features based on a given scope. SYNTAXGet-SPFeature [-Identity ] [-AssignmentCollection ] [-Limit ] [] Get-SPFeature [-Identity ] [-AssignmentCollect ion ] [-Farm ] [-Limit ] [ ] Get-SPFeature [-Identity ] [-AssignmentCollection ] [-Limit ] [-Sandboxed ] [-Site ] [] Get-SPFeature [-Identity ] [-AssignmentCollection ] [-Limit ] [-Web ] [] Get-SPFeature [-Identity ] [-AssignmentCollection ] [-Limit ] [-WebApplication ] [] DETAILED DESCRIPTIONAll SPFeature sets take the Identity parameter, which can be either the relative path of the SharePoint Feature (considered the feature name) or the GUID of a Feature definition. If the Identity parameter is provided, the cmdlets attempt to find the given Feature definition or instance for the given scope. If no parameters are specified, all installed features are returned. The Get-SPFeature cmdlet behaves differently at each scope, returning the enabled Features at each level. If no scope is provided, all installed Features are returned. get-spfeature (returns all the installed Feature definitions in the farm ) get-spfeature -farm ( returns all the enabled Feature in the farm) get-spfeature -webapplication (returns all enabled the Features in the Webapplication)get-spfeature -site (returns all the enabled Features on the site <>) get-spfeature -site -sandboxed (returns all installed the ptc Feature definitions on the site)get-spfeature -web (returns all the enabled Features in the Web)RELATED LINKSREMARKSFor more information, type: "get-help Get-SPFeature -detailed". For technical information, type: "get-help Get-SPFeature -full".[...]

Up and running with the SharePoint 2010 Public Beta

Wed, 06 Jan 2010 06:46:00 +0000

Although, I am late by few weeks, I started with the installation for SharePoint 2010 Public Beta last week. Although, I have been following and reading lot of stuff on SharePoint 2010 in last few months. Installation was pretty neat. Very good experience as compared to SharePoint 2007 beta.

Although, I missed on installing the prerequisites through the setup and started running the prerequisites on my own. After running the required all the prerequisites, setup kept on giving me the error for 'Windows Server Features or Role Services required by the product are not enabled'. ( Attached snapshot). I tried multiple things - enabled the role services on the server.


I ran the SharePoint 2010 prerequisites which added administration roles. After that SharePoint 2010 installation was pretty straight forward. Way to go …

I am planning to share lot of technical details on different areas of SharePoint 2010 in next few weeks.

Connectbeam - SharePoint Connector

Fri, 11 Sep 2009 11:33:00 +0000

Connectbeam, founded in December, 2005, is a leading provider of enterprise social software applications and the first company to integrate concepts of social bookmarking and tagging with those of social networking. Connectbeam's new Spotlight Connect for SharePoint provides SharePoint users with a single destination for discovering and sharing rich enterprise social bookmarking and tagging information. Spotlight Connect for SharePoint also extends and enhances the native collaboration and discovery capabilities of SharePoint Server 2007.

Spotlight Connect for SharePoint -

Spotlight Connect for SharePoint is deployed as a series of customizable SharePoint Web Parts, including:
• Social Search and Related Content
• Social Graphs
• Bookmarks
• Tags
• Groups
• Connections

Suggested Improvements -

SharePoint Document Library - Connectbeam integration

  • Incase user would like to share information in the document library at the enterprise level, option to publish the information to Connectbeam

  • SharePoint List (Announcements, Custom List etc. ) - Connectbeam integration

    In case users would like to share announcement or a part of it with Connectbeam groups or corresponding Enterprise, it would be a good functionality to have.

Populating and Creating Business Entities from SharePoint List

Thu, 10 Sep 2009 07:39:00 +0000

Patterns and practices has released a new version of guidance for building collaborative applications.

One of the new functionality provided by the Microsoft group is very useful and generic, w.r.t creating and saving business entities. Concept is based on List based repositories by following below steps -

  1. Business entity class E.g. Customer
  2. Static class that contains the SharePoint field IDs for the list to be used.
  3. Repository class which creates instance of the ListItemFieldMapper class and adds mappings that associate the field IDs to the corresponding property of the business entity

    Please refer - for more details

  4. After business entity and mapping classes are defines, generic functionality could be used to retrieve and save the business entity directly with SharePoint.

    Sample Code -

  • Creating collection for Customer Business Entity:

    public IList GetAllCustomers()
    // ...

    using (SPSite site = new SPSite(customerWebUrl))
    using (SPWeb customerWeb = site.OpenWeb())
    SPList customerList = customerWeb.Lists[Constants.CustomerListName];
    CAMLQueryBuilder camlQueryBuilder = new CAMLQueryBuilder();
    SPListItemCollection items = customerList.GetItems(camlQueryBuilder.Build());

    IList customers = new List();
    foreach(SPListItem item in items)
    Customer customer = listItemFieldMapper.CreateEntity(item);
    return customers;

  • Save a Business Entity to a List

    public void AddCustomer(Customer customer)
    using (SPSite site = new SPSite(customerWebUrl))
    using (SPWeb customerWeb = site.OpenWeb())
    SPList customerList = customerWeb.Lists[Constants.CustomerListName];
    SPListItem customerListItem = customerList.Items.Add();
    this.listItemFieldMapper.FillSPListItemFromEntity( customerListItem, customer);

SharePoint List Association Manager

Sun, 03 May 2009 12:17:00 +0000

While starting on design of SharePoint Custom applications, one of the dilemma which comes - Whether to use SharePoint lists as DataStore or Use RDBMS for storing master and transaction data.

Advantages of SharePoint Lists -

  • Out of box User Interface, reduces development effort
  • Available UI Column types of text, multi line, drop down, radio button, date time etc.
  • Allow lookup columns to define relationships between lists.
  • Sorting and Paging
  • Different Views based on user needs
  • Multiple Records Data Entry
  • Email Alerts
  • Integration with Excel, Access etc.
  • Provides RSS Feeds

Implementing Database Entities as SharePoint Lists, allow users to perform CRUD operations and out-of-box UI with above features.

Limitation of SharePoint Lists for maintaining Database Entities -

  • As SharePoint manages the storage and retrieval of data, Application developers has no control over it, to optimize or tweak the operation.
  • Performance Issues of SharePoint lists : It is well known about SharePoint List performance issue. Refer -
  • Basic Database Features missing in SharePoint list - Unique Constraints, Foreign Key relationships between lists, Database Constraints etc.

SharePoint List Association Manager ( SLAM ) overcomes one of the limitation of defining relationships on SharePoint lists. In nutshell, it creates the Database Tables of Lists and Relationships in External Database. Uses SharePoint eventhandlers to update external database list and relationship tables. Association of lists is based on SLAM xml configuration files. External Database provides independent datastore for reporting, and provides performance gain.

Working with SLAM, there are few things, I found out ( based on my current understanding) -

Explaining by taking example of two SharePoint Lists 'Country' and 'City'. 'Country' has a single text column 'CountryCode'. 'City' has two columns - Text column 'CityName' and lookup column from 'Country' list.

  • No constraints on lists at SharePoint lists. It allows deletion of data from 'Country' list, even if we have relationship data in 'City' list.
  • Allows deletion of parent SharePoint list 'Country', even after relationship defined.
  • Duplicates the data between SharePoint list and External Database Tables.
  • Overhead of maintaining SLAM config, as we have already defined metadata for lists in SharePoint.
  • Performance Issues - Takes approx. 30 minutes to sync SharePoint lists having 20000 records. Concerns on implementations with Enterprise applications with large amount of data.

SLAM doesn't provide Database features of primary keys, constraints, triggers etc.

In my view, SharePoint lists should be mistaken as replacement for Relational Database Management System. For small amount of data and keeping SharePoint lists constraints, might be useful for smaller chunk of data.

Agile Software Projects - Possible Reasons for failure

Fri, 01 May 2009 20:02:00 +0000

Agile's attractiveness with short-burst development cycles, sometimes overshadows the preconditions to rapid-development. The belief in agile is that it's quicker to refactor the product along the way than to try to define everything completely up front, which arguably is impossible.

Potential Reasons for Agile Software Projects failure, keeping Agile Principles in view -

  • Product owners non-commitment to being actively involved throughout the project

  • Not effective collaboration with business colleagues or customers

  • Requirements emerge and evolve, results into Scope changes, creates the risk of ever-lasting projects. Sometimes, No documentation, whatsoever.

  • Wasted Effort on deliverables that don't last

  • Less predictability, at the start of the project and during, about what the project is actually going to deliver.

  • Design flaws - Constant requirements change within short durations, and shorter delivery spans, doesn't allow scope to detailed design. Also, not being aware of high level requirements at the start, doesn't allow to have high level design understanding.

  • Testers needed throughout the project - To ensure quality, additional cost to the project for testing during regular short releases.

  • Development Team Burnout - Agile development is rather intense for developers. The need to really complete each feature 100% within each iteration, and the relentlessness of iterations, can be mentally quite tiring so it's important to find a sustainable pace for the team.

Oracle SharePoint - Integration Points : Opens new possibilities

Fri, 01 May 2009 14:57:00 +0000

Oracle Universal Content Management Integration with SharePoint using Web PartsWebParts to use Oracle ECM as backend and SharePoint as frontend. The web parts also provide for the use of both a SharePoint content repository and a Content Server repository. Content items can be moved between the two systems. This allows consumers who are familiar with SharePoint to interact with the Content Server through a known interface, thus making it easier to contribute and search for content.Two primary use cases exist for the combination of the Web Parts product and SharePoint:Using SharePoint to collaborate on documents then ‘promoting’ them to a Content Server for storage or use on the enterprise system. This allows users to manage content in SharePoint, including in workflows, collaboration projects, and so forth, but use Content Server for storage and retention. Using a SharePoint front end but storing the content behind SharePoint in a Universal Content Management (UCM) system. This allows users who are familiar with SharePoint to use that interface for many tasks.SharePoint BDC to connect to Oracle Databases : Business Data Catalog is a feature in MOSS 2007, it provides you with an easy way to integrate line of business data in MOSS 2007, without any code. Following article provides details on creating and implementing BDC for Oracle Databases.Oracle Universal Records Management Adapter for MOSS 2007 : It Communicates between Records Manager and SharePoint Database Server. The Adapter provides common retention functionality like identification, search and applying policies on the content items.Oracle Fusion Middleware combining with SharePoint : Oracle Fusion Middleware includes a unique and broad set of capabilities that help IT organizations get control of SharePoint deployments while enhancing the content experience for end users. It help organizations with Share content once the creation phase of the lifecycle is complete by publishing content to an enterprise content management (ECM) system for enterprise access and distributionComply with industry or government regulations and policies with centralized policy management across distributed SharePoint environments Implement in-place records and retention management—including legal holds—across SharePoint instances Archive content from SharePoint into a single, secure, online repositorySecurely search across multiple libraries and instances Implement information security across and beyond SharePoint environments—including securing documents on laptops, flash drives, and within systems beyond the firewall Integrate SharePoint content within enterprise and composite applicationsOracle Access Manager Integration with SharePoint : Oracle Access Manager provides a full range of identity management and security functions, including: Web-based single sign-on (SSO), user self-service and self-registration, user provisioning, reporting and auditing, policy management, dynamic groups, and delegated administration. Oracle Access Manager integrates with all leading directory servers, application servers, Web servers, and enterprise applications.Once Oracle Access Manager has been integrated with SPPS, the Access System handles user authentication through an ISAPI filter for IIS and an ISAPI wild card extension, which enables single sign-on between Oracle Access Manager and SPPS. WSS handles resource request authorization for all SPPS resources.Such integrat[...]