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/)

Monday 20 November 2017

Working with Calendar events from Office 365

In this article post, let us look at the way of accessing the Office 365 calendar events programmatically using REST APIs.

In the samples shown, calendar events will be accessed from SharePoint portal pages using two ways. One way is to use the graph API and the other way is using the outlook API.


Outlook API vs Microsoft Graph API:


Outlook API has lot of API end points to access the mailbox data in office 365 or other Microsoft mailbox services. It has around 11 API subsets for accessing various components under outlook like calendar, contacts, etc.

Microsoft Graph API, helps getting connected to multiple Microsoft products or services. The services include outlook, teams, SharePoint, people etc. This also helps in accessing other user information as well.

Tuesday 14 November 2017

Using Webhooks for Posting SharePoint Items into MS Teams with Flows

In my previous post, you would have seen posting the items into Microsoft Teams Channels as conversations using Microsoft Flows. The respective channels will be chosen by selecting the Teams service in the flow configurations.

In this post, let us try to achieve similar kind of functionality, but with a little different approach. As we are all aware that Microsoft Teams will support incoming webhook requests, let us try configuring the webhook URLs.


Webhook:


What is webhook? The external system which posts messages whenever data is available using the endpoint APIs.


How the webhook will help in Microsoft Teams? Take for an example, you are using Teams as a collaboration platform. You need to post data from multiple systems to the team channels for better collaboration. The webhook URL can be generated for a channel and can be shared with other external systems. Whenever the external system has the data for posting, the data will be sent to the teams using the API generated.