Tuesday 6 February 2018

Introduction to SharePoint Webhooks

What is Webhook?


Web hook is a general concept for http based events, which will provide remote event mechanisms.

Say for example, you have a built a custom application separately which has some specific product related content. Whenever there is a data change on the product repository, your data on the custom application should also be updated. For this scenario, will you be keep on checking the product repository for the changes? The answer should be No. Instead of your application keep on poll the product for changes, product should notify or push the changes to your application.

What is SharePoint Webhook?


Previously for working with event based processes, we were using the server side event receivers and remote events receivers. Such processes can be replaced with the webhooks.

Wednesday 17 January 2018

Search Results in SharePoint with PnP JavaScript Core Library

SharePoint search provides ways to access the search results using PnP JavaScript core library programming. This post explores the search results, paging option and also describes about the customized wrapper objects available for developers, with #PnPJScore programming.

PnP JS core library provides wrapper object with more customized search results data for developers. Like other programming models like REST API or JSOM, PnP JS core also provides the raw search results as RawSearchResults object. Additionally, PnP JS core also provides few other objects, which is customized for developers. These objects are customized, and retrieved from the RawSearchResults object, which in turn is part of the JSON result.

Search Results Object:


Notable objects are listed below.
  • PrimarySearchResults – This object gets the formatted results from the RawSearchResults object. That is, this object will contain the necessary search results data that can be processed or displayed. It contains the formatted results from the following path.      RawSearchResults.PrimaryQueryResult.RelevantResults.Table.Rows
  • RowCount – Number of rows retrieved during the search query.
  • TotalRows – Number of items available for search query.

Tuesday 9 January 2018

Building SharePoint Search Queries using PnP JavaScript Core Library

PnP JavaScript core library provides the interfaces required for building the queries for searching SharePoint content.

There are multiple ways of building the queries for PnP JS core search.
  • One way is to use the Search Query interface directly with necessary query parameters
  • The other way is to build the query using Search query builder syntax along with other query parameters.
  • The default way passing just the query text to the search method.

PnP JS core acts as a wrapper for the interacting with the SharePoint data over the object models or the REST APIs available. The samples or syntax explained below are compatible for JavaScript editors.

Thursday 28 December 2017

Working with SharePoint Site Permissions using PnP JavaScript Core Library

Here let us look at the working with SharePoint site permissions using the PnP JavaScript library. Some of the basic operations like retrieve available permissions, add or remove the user permissions from the site will be explained.

Note: 
  • PnP JavaScript Core Library is supported on SharePoint 2013, SharePoint 2016 and SharePoint Online versions.
  • The prerequisites for the operations are es6-promise.jsfetch.js, pnp.js or pnp.min.js.

The following sample shows us retrieving all user permissions of the SharePoint site along with the user roles using PnP JavaScript Core library.



Saturday 9 December 2017

Azure Active Directory App Authentications

Azure AD App registrations provides ways for authenticating or authorizing the user custom applications which uses Azure AD, to access the data available on the Microsoft products/services.

Why Azure AD App Registration? You might have already worked with custom applications that uses Azure Control Service, which provides way for authenticating users to gain access to web applications and services. As ACS is getting deprecated, Microsoft provides ways for authenticating the applications and provides way for enabling permissions for users to access the data. 

(Source: https://cloudblogs.microsoft.com/enterprisemobility/2013/06/22/azure-active-directory-is-the-future-of-acs/)