Office 365 navigation bar – New Feature -Pin apps to the navigation bar

With all improvements and enhancements, another best feature has started to roll out from today in office 365.

The app launcher enables you to navigate across your services and apps in Office 365. we can can also pin up to three apps in navigation bar .

This makes those apps available instantly, from any Office 365 page or app.It will be more beneficial for the admin users.

navigation bar short cut



Remove All Items in List using MS PnP Powershell – SharePoint Online

I am sharing the below power shell snippet to help my fellows to remove all items in a list in the SharePoint online. Often we need to delete items at once using power shell or through JS code. PNP Power shell make it more easier to complete our task. (hats off)

Copy and paste the below code, it will loop through to a list and remove the item. Change the List name as yours.

Connect-PnPOnline –Url https://*********************

$items =Get-PnPListItem -List “ListName” -PageSize 1000

foreach ($item in $items)
Remove-PnPListItem -List “ListName” -Identity $item.Id -Force
Write-Host “error”

} #for each end

To install PNP Power shell check the PnP PowerShell overview.

#Sharing is caring

Skype for Business integration in Yammer

Yammer is very cool social media plugin within the office. It makes more strong bonding among departments. We found it very useful tool in our organization. With the new Roadmap plan, MS has enhanced its features with Some basic options.

Beginning July 2017, Yammer users with a Skype for Business subscription will start seeing the Skype for the Business icon on the Office 365 navigation bar in Yammer.

This message is associated with Office 365 Roadmap ID 14805.

On the navigation bar, click (or tap) the Skype for Business icon ( Skype for Business icon on the Office 365 navigation bar ).

Choose the Skype for a Business task that you want to do.


Search for people in your organization

  1. Click (or tap) the magnifying glass ( Search for contacts ).
  2. In the search box, type the name of who you want to contact.
  3. Select the person from the contacts list.
  4. To add the person to your contacts list, click Add To Contacts.


View your contacts list

  1. Click (or tap) the address book icon ( View your contacts list ).
  2. Choose a contact from the list or search for someone else.

Start a conversation

  1. Click (or tap) the plus sign ( Start a conversation ).
  2. In the conversation window, type your message.
How does it affect me?
Yammer users with Skype for Business subscription can now launch and perform some basic Skype for Business tasks right from their Office 365 navigation bar in Yammer.
This feature will initially be available for first release customers and will start rolling out to a subset of production customers starting mid-July, with the majority of customers receiving this update by the end of July.
What do I need to do to prepare for this change?
This feature will be on by default. While no action is required,

Upload Docs to SharePoint Library & Update Columns using Pnp.js

Microsoft SharePoint Pattern and practices libraries makes it very simple to deal with SharePoint site. Less code and easy to understand. Link to SharePoint PNP-JS-Core.

In this article I will use pnp.js library to upload document and update the other fields in the same item uploaded in SharePoint document library.

(1 ) We need to reference the 4 files to work with pnp.js



(2)I have reference the bootstrap in my page and use bootstrap classes.

Html of upload file, I have attached the link of Html Code in the PDF file, just copy and paste.

(3)  Now Call Simple JS Function UploadFiles() to Upload file and update the fields in the same item uploaded. Copy the below Code in JS File.

function UploadFiles() {
var files = document.getElementById(‘exampleInputFile’).files;
var file = files[0]; //using File Api
if (file!=undefined || file!=null){
.files.add(, file, true)
.then(function (data) {
var RelativeUrls=”/Documents/”;

//Retrive Document which is uploaded. Start
$pnp.sp.web.getFolderByServerRelativeUrl(RelativeUrls).getItem().then(item => {
//update start Below Call to Doc List will update the Row baseed on Item.ID
ColumnName: ‘New Value’
}).then(r => {
alert( + ” upload successfully!”);
//update end
}); //Retrive Doc Info End
}); //Upload Document End




Below are the References to pnp js core library to deal with files and update item by id.  PDF file contain the html part.


SharePoint Remote Event Receiver – Item Deleting – Using Provider hosted App

Scenario : We need to capture the person who delete the item in the document in SharePoint. On item deletion event will fire and add item to another list for further record. Code is attached and screen shorts are below step by step.

We have implemented a Remote Event Receiver on Document Library by Provider hosted app.

Pre-Requisites:(1) Office Developer Tool for VS2013  or VS2015, (2) Office 365 Subscription (3) Azure Subscription to host website over ssl.

  • First Create the SharePoint Add-In.
Select SharePoint Project
Select SharePoint Project


Select the SharePoint version


Select the SharePoint version


Choose the web project which will host the web service. As I am a big fan of MVC, So I select MVC.




SharePoint Will Create Two Project one is SharePoint – Add in (App) which will reside in our App Catalog in our SharePoint.

Another web MVC project will host the web services, as SharePoint Event Remote Event Receivers use web services, Client Secret and Client ID to communicate for any event.

Now we will Add Events on our App Installing and App Uninstalling Events. I.e. Whenever App Install, our App will call web service to run one Process Method.

Right Click on our App Solution and Click for properties.




Once we Make Handle App Installed True, VS will create a AppEventServices.svc in our web project.




In AppEventReceivers.svc file a Process Methods Function we will Attached Event to the Doc Library on Item Deleting.

Below mentioned the Receiver Name, and the List Name on which we want to Add Event i.e. Document Library and the Destination List Name


Below mentioned is the Process Event Methods which run all the time.



In the Process Event Methods,



On App Installed Event i.e. when we add App to Site AppInstalled Event will occur. If Event not Exists than attached Event on ItemDeleting




9 10

If ItemDeleting occurs in the Document Library mentioned in the above than HandleItem event will occur.





Inside AddItem using CSOM to Add item to the List.


Now Build Solution, We are ready to register the website so that they will communicate with SharePoint using Client ID and Client Secret.


Go the App Catalog site and open the appregnew.aspx in the layouts.





Take the Client ID, Client Secret, and Title of the projects. App Domain the website name (The Azure site or any public hosting Site which can host this web).


Redirect url will be the default page of the site of hosted web.


To Host our web, we will use Azure which can communicate to SharePoint during item deleting event over ssl.


We will go to Azure web portal add new web.




Give any name. Export the publishing profile




For publishing profile, go the new created site, click on overview, Click on Get Publshing profile and export to your pc. This will help to publish the web from VS.


17 18 19

Click Create. This will give the details, save it we will need the Client ID and Client Secret to enter in the app and in the website to Communicate. By doing this SP (SharePoint) will know the handshake token.




Now Bind the app and the website using the Client ID and Client Secret. Open the AppMenifex.xml from app. Right Click on show code.





Enter the Client ID which we taken previously. This will alert SharePoint that whoever take this ID is can go next step.



Open the webconfig of website and enter the client secrect and client id.




Leave everything as it is.


Now publish the web to azure with the publishing profile.


24 25 26

Now publish app as .app file and upload to app catalog.

It will pop up to confirm the Client ID.









Make sure that the below List and Document Library should exists on the Destination site.





using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.EventReceivers;
using System.ServiceModel;
using System.ServiceModel.Channels;

namespace VDC_AppWeb.Services
public class AppEventReceiver : IRemoteEventService

private const string ReceiverName = “ItemDeleting”;
private const string ListName = “VDC Documents”;
private const string DestiNationList = “DestList”;
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)

SPRemoteEventResult result = new SPRemoteEventResult();
switch (properties.EventType)
case SPRemoteEventType.AppInstalled:
case SPRemoteEventType.AppUninstalling:
case SPRemoteEventType.ItemDeleting:
return result;

private void HandleAppInstalled(SPRemoteEventProperties properties)
using (ClientContext clientContext = TokenHelper.CreateAppEventClientContext(properties, false))
if (clientContext != null)
List myList = clientContext.Web.Lists.GetByTitle(ListName);
clientContext.Load(myList, p => p.EventReceivers);
bool rerExists = false;
foreach (var rer in myList.EventReceivers)
if (rer.ReceiverName == ReceiverName)
rerExists = true;
System.Diagnostics.Trace.WriteLine(“Found existing ItemDeleted receiver at ” + rer.ReceiverUrl);
if (!rerExists)
EventReceiverDefinitionCreationInformation receiver = new EventReceiverDefinitionCreationInformation();
receiver.EventType = EventReceiverType.ItemDeleting;
OperationContext op = System.ServiceModel.OperationContext.Current;
Message msg = op.RequestContext.RequestMessage;
receiver.ReceiverUrl = msg.Headers.To.ToString();
receiver.ReceiverName = ReceiverName;
receiver.Synchronization = EventReceiverSynchronization.Synchronous;
System.Diagnostics.Trace.WriteLine(“Added ItemDeleted receiver at ” + msg.Headers.To.ToString());

private void HandleAppUninstalling(SPRemoteEventProperties properties)
using (ClientContext clientContext =
TokenHelper.CreateAppEventClientContext(properties, false))
if (clientContext != null)
List myList = clientContext.Web.Lists.GetByTitle(ListName);
clientContext.Load(myList, p => p.EventReceivers);

var rer = myList.EventReceivers.Where(
e => e.ReceiverName == ReceiverName).FirstOrDefault();

System.Diagnostics.Trace.WriteLine(“Removing ItemDeleted receiver at ”
+ rer.ReceiverUrl);

//This will fail when deploying via F5, but works
//when deployed to production

catch (Exception oops)


private void HandleItem(SPRemoteEventProperties properties)
using (ClientContext clientContext = TokenHelper.CreateRemoteEventReceiverClientContext(properties))
if (clientContext != null)
List photos = clientContext.Web.Lists.GetById(properties.ItemEventProperties.ListId);
ListItem item = photos.GetItemById(properties.ItemEventProperties.ListItemId);
// FieldUserValue fvv2 = (FieldUserValue);

string Titles = Convert.ToString(item[“FileLeafRef”]);
string Location = Convert.ToString(item[“FileRef”]); ;
string FinalLocation = Location.Replace(Titles, ” “);
string CreatedBys = properties.ItemEventProperties.UserDisplayName;

AddItem(Titles, CreatedBys, FinalLocation, properties);
catch (Exception oops)
private void AddItem(string Title, string User, string Location, SPRemoteEventProperties properties)

using (ClientContext clientContext = TokenHelper.CreateRemoteEventReceiverClientContext(properties))
if (clientContext != null)
List oList = clientContext.Web.Lists.GetByTitle(“VDC Delete Info”);

ListItemCreationInformation listItemCreationInfo = new ListItemCreationInformation();
ListItem oListItem = oList.AddItem(listItemCreationInfo);
oListItem[“Title”] = Title;
oListItem[“DeleteBy”] = User;
oListItem[“Location”] = Location;

/// <summary>
/// This method is a required placeholder, but is not used by app events.
/// </summary>
/// <param name=”properties”>Unused.</param>
public void ProcessOneWayEvent(SPRemoteEventProperties properties)
throw new NotImplementedException();